diff --git a/discovery/cloudbuild-v1.json b/discovery/cloudbuild-v1.json index 13d17ee6be2..b61d851bac6 100644 --- a/discovery/cloudbuild-v1.json +++ b/discovery/cloudbuild-v1.json @@ -159,47 +159,6 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "flatPath": "v1/operations", - "httpMethod": "GET", - "id": "cloudbuild.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" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } }, @@ -431,47 +390,6 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", - "httpMethod": "GET", - "id": "cloudbuild.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" - ] } } } @@ -674,53 +592,9 @@ } } } - }, - "vbeta1": { - "resources": { - "projects": { - "resources": { - "locations": { - "resources": { - "operations": { - "methods": { - "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "flatPath": "vbeta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", - "httpMethod": "POST", - "id": "cloudbuild.vbeta1.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": "vbeta1/{+name}:cancel", - "request": { - "$ref": "CancelOperationRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - } - } - } - } } }, - "revision": "20200606", + "revision": "20200704", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ArtifactObjects": { @@ -975,12 +849,16 @@ "enum": [ "LOGGING_UNSPECIFIED", "LEGACY", - "GCS_ONLY" + "GCS_ONLY", + "STACKDRIVER_ONLY", + "NONE" ], "enumDescriptions": [ "The service determines the logging mode. The default is `LEGACY`. Do not\nrely on the default logging behavior as it may change in the future.", - "Stackdriver logging and Cloud Storage logging are enabled.", - "Only Cloud Storage logging is enabled." + "Cloud Logging (Stackdriver) and Cloud Storage logging are enabled.", + "Only Cloud Storage logging is enabled.", + "Only Cloud Logging (Stackdriver) is enabled. Note that logs for both the\nCloud Console UI and Cloud SDK are based on Cloud Storage logs, so\nneither will provide logs if this option is chosen.", + "Turn off all logging. No build logs will be captured." ], "type": "string" }, @@ -1308,6 +1186,17 @@ }, "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", @@ -1370,18 +1259,113 @@ }, "type": "object" }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "id": "ListOperationsResponse", + "Notification": { + "description": "Notification is the container which holds the data that is relevant to this\nparticular notification.", + "id": "Notification", "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", + "filter": { + "description": "The filter string to use for notification filtering.\nCurrently, this is assumed to be a CEL program.\nSee https://opensource.google/projects/cel for more.", "type": "string" }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", + "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\nthis notifier.", + "id": "NotifierMetadata", + "properties": { + "name": { + "description": "The human-readable and user-given name for the notifier.\nFor example: \"repo-merge-email-notifier\".", + "type": "string" + }, + "notifier": { + "description": "The string representing the name and version of notifier to deploy.\nExpected to be of the form of \"/:\".\nFor 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\nGoogle Cloud Secret Manager resource path.", + "id": "NotifierSecret", + "properties": { + "name": { + "description": "Name is the local name of the secret, such as the verbatim string\n\"my-smtp-password\".", + "type": "string" + }, + "value": { + "description": "Value is interpreted to be a resource path for fetching the actual\n(versioned) secret data for this secret. For example, this would be a\nGoogle Cloud Secret Manager secret version resource path like:\n\"projects/my-project/secrets/my-secret/versions/latest\".", + "type": "string" + } + }, + "type": "object" + }, + "NotifierSecretRef": { + "description": "NotifierSecretRef contains the reference to a secret stored in the\ncorresponding NotifierSpec.", + "id": "NotifierSecretRef", + "properties": { + "secretRef": { + "description": "The value of `secret_ref` should be a `name` that is registered in a\n`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": "Operation" + "$ref": "NotifierSecret" }, "type": "array" } @@ -1559,6 +1543,40 @@ "properties": {}, "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.\nIf 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:`\nof 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\nvalues with the Cloud KMS key to use to decrypt the value.", "id": "Secret", @@ -1578,6 +1596,17 @@ }, "type": "object" }, + "SlackDelivery": { + "description": "SlackDelivery is the delivery configuration for delivering Slack messages via\nwebhooks. See Slack webhook documentation at:\nhttps://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\nchannel." + } + }, + "type": "object" + }, "Source": { "description": "Location of the source in a supported storage service.", "id": "Source", diff --git a/discovery/cloudbuild-v1alpha1.json b/discovery/cloudbuild-v1alpha1.json index ac3bdda916a..a1cdac6e247 100644 --- a/discovery/cloudbuild-v1alpha1.json +++ b/discovery/cloudbuild-v1alpha1.json @@ -163,47 +163,6 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations", - "httpMethod": "GET", - "id": "cloudbuild.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": "v1alpha1/{+name}/operations", - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } } @@ -347,7 +306,7 @@ } } }, - "revision": "20200606", + "revision": "20200704", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ArtifactObjects": { @@ -602,12 +561,16 @@ "enum": [ "LOGGING_UNSPECIFIED", "LEGACY", - "GCS_ONLY" + "GCS_ONLY", + "STACKDRIVER_ONLY", + "NONE" ], "enumDescriptions": [ "The service determines the logging mode. The default is `LEGACY`. Do not\nrely on the default logging behavior as it may change in the future.", - "Stackdriver logging and Cloud Storage logging are enabled.", - "Only Cloud Storage logging is enabled." + "Cloud Logging (Stackdriver) and Cloud Storage logging are enabled.", + "Only Cloud Storage logging is enabled.", + "Only Cloud Logging (Stackdriver) is enabled. Note that logs for both the\nCloud Console UI and Cloud SDK are based on Cloud Storage logs, so\nneither will provide logs if this option is chosen.", + "Turn off all logging. No build logs will be captured." ], "type": "string" }, @@ -829,6 +792,17 @@ }, "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", @@ -855,24 +829,6 @@ }, "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" - }, "ListWorkerPoolsResponse": { "description": "Response containing existing `WorkerPools`.", "id": "ListWorkerPoolsResponse", @@ -906,6 +862,119 @@ }, "type": "object" }, + "Notification": { + "description": "Notification is the container which holds the data that is relevant to this\nparticular notification.", + "id": "Notification", + "properties": { + "filter": { + "description": "The filter string to use for notification filtering.\nCurrently, this is assumed to be a CEL program.\nSee 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\nthis notifier.", + "id": "NotifierMetadata", + "properties": { + "name": { + "description": "The human-readable and user-given name for the notifier.\nFor example: \"repo-merge-email-notifier\".", + "type": "string" + }, + "notifier": { + "description": "The string representing the name and version of notifier to deploy.\nExpected to be of the form of \"/:\".\nFor 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\nGoogle Cloud Secret Manager resource path.", + "id": "NotifierSecret", + "properties": { + "name": { + "description": "Name is the local name of the secret, such as the verbatim string\n\"my-smtp-password\".", + "type": "string" + }, + "value": { + "description": "Value is interpreted to be a resource path for fetching the actual\n(versioned) secret data for this secret. For example, this would be a\nGoogle Cloud Secret Manager secret version resource path like:\n\"projects/my-project/secrets/my-secret/versions/latest\".", + "type": "string" + } + }, + "type": "object" + }, + "NotifierSecretRef": { + "description": "NotifierSecretRef contains the reference to a secret stored in the\ncorresponding NotifierSpec.", + "id": "NotifierSecretRef", + "properties": { + "secretRef": { + "description": "The value of `secret_ref` should be a `name` that is registered in a\n`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\nnetwork API call.", "id": "Operation", @@ -1025,6 +1094,40 @@ }, "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.\nIf 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:`\nof 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\nvalues with the Cloud KMS key to use to decrypt the value.", "id": "Secret", @@ -1044,6 +1147,17 @@ }, "type": "object" }, + "SlackDelivery": { + "description": "SlackDelivery is the delivery configuration for delivering Slack messages via\nwebhooks. See Slack webhook documentation at:\nhttps://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\nchannel." + } + }, + "type": "object" + }, "Source": { "description": "Location of the source in a supported storage service.", "id": "Source", diff --git a/discovery/cloudbuild-v1alpha2.json b/discovery/cloudbuild-v1alpha2.json index 6b795c0796f..dd93b047b15 100644 --- a/discovery/cloudbuild-v1alpha2.json +++ b/discovery/cloudbuild-v1alpha2.json @@ -163,47 +163,6 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/operations", - "httpMethod": "GET", - "id": "cloudbuild.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" - ] } } } @@ -358,7 +317,7 @@ } } }, - "revision": "20200606", + "revision": "20200704", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ArtifactObjects": { @@ -613,12 +572,16 @@ "enum": [ "LOGGING_UNSPECIFIED", "LEGACY", - "GCS_ONLY" + "GCS_ONLY", + "STACKDRIVER_ONLY", + "NONE" ], "enumDescriptions": [ "The service determines the logging mode. The default is `LEGACY`. Do not\nrely on the default logging behavior as it may change in the future.", - "Stackdriver logging and Cloud Storage logging are enabled.", - "Only Cloud Storage logging is enabled." + "Cloud Logging (Stackdriver) and Cloud Storage logging are enabled.", + "Only Cloud Storage logging is enabled.", + "Only Cloud Logging (Stackdriver) is enabled. Note that logs for both the\nCloud Console UI and Cloud SDK are based on Cloud Storage logs, so\nneither will provide logs if this option is chosen.", + "Turn off all logging. No build logs will be captured." ], "type": "string" }, @@ -840,6 +803,17 @@ }, "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", @@ -866,24 +840,6 @@ }, "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" - }, "ListWorkerPoolsResponse": { "description": "Response containing existing `WorkerPools`.", "id": "ListWorkerPoolsResponse", @@ -909,6 +865,119 @@ }, "type": "object" }, + "Notification": { + "description": "Notification is the container which holds the data that is relevant to this\nparticular notification.", + "id": "Notification", + "properties": { + "filter": { + "description": "The filter string to use for notification filtering.\nCurrently, this is assumed to be a CEL program.\nSee 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\nthis notifier.", + "id": "NotifierMetadata", + "properties": { + "name": { + "description": "The human-readable and user-given name for the notifier.\nFor example: \"repo-merge-email-notifier\".", + "type": "string" + }, + "notifier": { + "description": "The string representing the name and version of notifier to deploy.\nExpected to be of the form of \"/:\".\nFor 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\nGoogle Cloud Secret Manager resource path.", + "id": "NotifierSecret", + "properties": { + "name": { + "description": "Name is the local name of the secret, such as the verbatim string\n\"my-smtp-password\".", + "type": "string" + }, + "value": { + "description": "Value is interpreted to be a resource path for fetching the actual\n(versioned) secret data for this secret. For example, this would be a\nGoogle Cloud Secret Manager secret version resource path like:\n\"projects/my-project/secrets/my-secret/versions/latest\".", + "type": "string" + } + }, + "type": "object" + }, + "NotifierSecretRef": { + "description": "NotifierSecretRef contains the reference to a secret stored in the\ncorresponding NotifierSpec.", + "id": "NotifierSecretRef", + "properties": { + "secretRef": { + "description": "The value of `secret_ref` should be a `name` that is registered in a\n`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\nnetwork API call.", "id": "Operation", @@ -1028,6 +1097,40 @@ }, "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.\nIf 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:`\nof 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\nvalues with the Cloud KMS key to use to decrypt the value.", "id": "Secret", @@ -1047,6 +1150,17 @@ }, "type": "object" }, + "SlackDelivery": { + "description": "SlackDelivery is the delivery configuration for delivering Slack messages via\nwebhooks. See Slack webhook documentation at:\nhttps://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\nchannel." + } + }, + "type": "object" + }, "Source": { "description": "Location of the source in a supported storage service.", "id": "Source", diff --git a/src/apis/cloudbuild/v1.ts b/src/apis/cloudbuild/v1.ts index 84a8f55fdcc..d06e692a3f1 100644 --- a/src/apis/cloudbuild/v1.ts +++ b/src/apis/cloudbuild/v1.ts @@ -117,7 +117,6 @@ export namespace cloudbuild_v1 { context: APIRequestContext; operations: Resource$Operations; projects: Resource$Projects; - vbeta1: Resource$Vbeta1; constructor(options: GlobalOptions, google?: GoogleConfigurable) { this.context = { @@ -127,7 +126,6 @@ export namespace cloudbuild_v1 { this.operations = new Resource$Operations(this.context); this.projects = new Resource$Projects(this.context); - this.vbeta1 = new Resource$Vbeta1(this.context); } } @@ -523,6 +521,15 @@ export namespace cloudbuild_v1 { */ 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; + } /** * Response including listed builds. */ @@ -550,17 +557,98 @@ export namespace cloudbuild_v1 { triggers?: Schema$BuildTrigger[]; } /** - * The response message for Operations.ListOperations. + * Notification is the container which holds the data that is relevant to this particular notification. */ - export interface Schema$ListOperationsResponse { + export interface Schema$Notification { /** - * The standard List next-page token. + * 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. */ - nextPageToken?: string | null; + 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; /** - * A list of operations that matches the specified filter in the request. + * The string representing the name and version of notifier to deploy. Expected to be of the form of "<registry-path>/<name>:<version>". For example: "gcr.io/my-project/notifiers/smtp:1.2.34". */ - operations?: Schema$Operation[]; + 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. @@ -704,6 +792,44 @@ export namespace cloudbuild_v1 { */ secretEnv?: {[key: string]: string} | null; } + /** + * 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. */ @@ -1064,148 +1190,6 @@ export namespace cloudbuild_v1 { return createAPIRequest(parameters); } } - - /** - * cloudbuild.operations.list - * @desc 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 - * // 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('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 cloudbuild.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; - * }); - * - * @alias cloudbuild.operations.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.filter The standard list filter. - * @param {string} params.name The name of the operation's parent resource. - * @param {integer=} params.pageSize The standard list page size. - * @param {string=} params.pageToken The standard list page token. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - 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://cloudbuild.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<{} | void> - ); - } else { - return createAPIRequest(parameters); - } - } } export interface Params$Resource$Operations$Cancel @@ -1226,24 +1210,6 @@ export namespace cloudbuild_v1 { */ 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; @@ -2393,152 +2359,6 @@ export namespace cloudbuild_v1 { return createAPIRequest(parameters); } } - - /** - * cloudbuild.projects.locations.operations.list - * @desc 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 - * // 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('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 cloudbuild.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; - * }); - * - * @alias cloudbuild.projects.locations.operations.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.filter The standard list filter. - * @param {string} params.name The name of the operation's parent resource. - * @param {integer=} params.pageSize The standard list page size. - * @param {string=} params.pageToken The standard list page token. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - 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://cloudbuild.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<{} | void> - ); - } else { - return createAPIRequest(parameters); - } - } } export interface Params$Resource$Projects$Locations$Operations$Cancel @@ -2560,25 +2380,6 @@ export namespace cloudbuild_v1 { */ 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; - } export class Resource$Projects$Triggers { context: APIRequestContext; @@ -3572,189 +3373,4 @@ export namespace cloudbuild_v1 { */ requestBody?: Schema$RepoSource; } - - export class Resource$Vbeta1 { - context: APIRequestContext; - projects: Resource$Vbeta1$Projects; - constructor(context: APIRequestContext) { - this.context = context; - this.projects = new Resource$Vbeta1$Projects(this.context); - } - } - - export class Resource$Vbeta1$Projects { - context: APIRequestContext; - locations: Resource$Vbeta1$Projects$Locations; - constructor(context: APIRequestContext) { - this.context = context; - this.locations = new Resource$Vbeta1$Projects$Locations(this.context); - } - } - - export class Resource$Vbeta1$Projects$Locations { - context: APIRequestContext; - operations: Resource$Vbeta1$Projects$Locations$Operations; - constructor(context: APIRequestContext) { - this.context = context; - this.operations = new Resource$Vbeta1$Projects$Locations$Operations( - this.context - ); - } - } - - export class Resource$Vbeta1$Projects$Locations$Operations { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } - - /** - * cloudbuild.vbeta1.projects.locations.operations.cancel - * @desc 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 - * // 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('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 cloudbuild.vbeta1.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; - * }); - * - * @alias cloudbuild.vbeta1.projects.locations.operations.cancel - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.name The name of the operation resource to be cancelled. - * @param {().CancelOperationRequest} params.requestBody Request body data - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - cancel( - params: Params$Resource$Vbeta1$Projects$Locations$Operations$Cancel, - options: StreamMethodOptions - ): GaxiosPromise; - cancel( - params?: Params$Resource$Vbeta1$Projects$Locations$Operations$Cancel, - options?: MethodOptions - ): GaxiosPromise; - cancel( - params: Params$Resource$Vbeta1$Projects$Locations$Operations$Cancel, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - cancel( - params: Params$Resource$Vbeta1$Projects$Locations$Operations$Cancel, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - cancel( - params: Params$Resource$Vbeta1$Projects$Locations$Operations$Cancel, - callback: BodyResponseCallback - ): void; - cancel(callback: BodyResponseCallback): void; - cancel( - paramsOrCallback?: - | Params$Resource$Vbeta1$Projects$Locations$Operations$Cancel - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Vbeta1$Projects$Locations$Operations$Cancel; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Vbeta1$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 + '/vbeta1/{+name}:cancel').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', - }, - options - ), - params, - requiredParams: ['name'], - pathParams: ['name'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback<{} | void> - ); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Vbeta1$Projects$Locations$Operations$Cancel - extends StandardParameters { - /** - * The name of the operation resource to be cancelled. - */ - name?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$CancelOperationRequest; - } } diff --git a/src/apis/cloudbuild/v1alpha1.ts b/src/apis/cloudbuild/v1alpha1.ts index 8a8dda7ae6f..5e73c46e811 100644 --- a/src/apis/cloudbuild/v1alpha1.ts +++ b/src/apis/cloudbuild/v1alpha1.ts @@ -434,17 +434,13 @@ export namespace cloudbuild_v1alpha1 { value?: string | null; } /** - * The response message for Operations.ListOperations. + * HTTPDelivery is the delivery configuration for an HTTP notification. */ - export interface Schema$ListOperationsResponse { + export interface Schema$HTTPDelivery { /** - * The standard List next-page token. + * The URI to which JSON-containing HTTP POST requests should be sent. */ - nextPageToken?: string | null; - /** - * A list of operations that matches the specified filter in the request. - */ - operations?: Schema$Operation[]; + uri?: string | null; } /** * Response containing existing `WorkerPools`. @@ -472,6 +468,100 @@ export namespace cloudbuild_v1alpha1 { */ subnetwork?: 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 "<registry-path>/<name>:<version>". 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. */ @@ -576,6 +666,44 @@ export namespace cloudbuild_v1alpha1 { */ secretEnv?: {[key: string]: string} | null; } + /** + * 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. */ @@ -1028,152 +1156,6 @@ export namespace cloudbuild_v1alpha1 { return createAPIRequest(parameters); } } - - /** - * cloudbuild.projects.locations.operations.list - * @desc 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 - * // 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('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 cloudbuild.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; - * }); - * - * @alias cloudbuild.projects.locations.operations.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.filter The standard list filter. - * @param {string} params.name The name of the operation's parent resource. - * @param {integer=} params.pageSize The standard list page size. - * @param {string=} params.pageToken The standard list page token. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - 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://cloudbuild.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1alpha1/{+name}/operations').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'GET', - }, - options - ), - params, - requiredParams: ['name'], - pathParams: ['name'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback<{} | void> - ); - } else { - return createAPIRequest(parameters); - } - } } export interface Params$Resource$Projects$Locations$Operations$Cancel @@ -1195,25 +1177,6 @@ export namespace cloudbuild_v1alpha1 { */ 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; - } export class Resource$Projects$Workerpools { context: APIRequestContext; diff --git a/src/apis/cloudbuild/v1alpha2.ts b/src/apis/cloudbuild/v1alpha2.ts index be67cf6e510..25829ecfa48 100644 --- a/src/apis/cloudbuild/v1alpha2.ts +++ b/src/apis/cloudbuild/v1alpha2.ts @@ -434,17 +434,13 @@ export namespace cloudbuild_v1alpha2 { value?: string | null; } /** - * The response message for Operations.ListOperations. + * HTTPDelivery is the delivery configuration for an HTTP notification. */ - export interface Schema$ListOperationsResponse { + export interface Schema$HTTPDelivery { /** - * The standard List next-page token. + * The URI to which JSON-containing HTTP POST requests should be sent. */ - nextPageToken?: string | null; - /** - * A list of operations that matches the specified filter in the request. - */ - operations?: Schema$Operation[]; + uri?: string | null; } /** * Response containing existing `WorkerPools`. @@ -464,6 +460,100 @@ export namespace cloudbuild_v1alpha2 { */ 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 "<registry-path>/<name>:<version>". 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. */ @@ -568,6 +658,44 @@ export namespace cloudbuild_v1alpha2 { */ secretEnv?: {[key: string]: string} | null; } + /** + * 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. */ @@ -1004,152 +1132,6 @@ export namespace cloudbuild_v1alpha2 { return createAPIRequest(parameters); } } - - /** - * cloudbuild.projects.locations.operations.list - * @desc 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 - * // 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('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 cloudbuild.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; - * }); - * - * @alias cloudbuild.projects.locations.operations.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.filter The standard list filter. - * @param {string} params.name The name of the operation's parent resource. - * @param {integer=} params.pageSize The standard list page size. - * @param {string=} params.pageToken The standard list page token. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - 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://cloudbuild.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<{} | void> - ); - } else { - return createAPIRequest(parameters); - } - } } export interface Params$Resource$Projects$Locations$Operations$Cancel @@ -1171,25 +1153,6 @@ export namespace cloudbuild_v1alpha2 { */ 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; - } export class Resource$Projects$Workerpools { context: APIRequestContext;