From 29dc45aeea5404991120dcf98ada41f452a2fb0c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Apr 2023 09:06:48 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#1941) --- beyondcorp/v1/beyondcorp-api.json | 695 +-- beyondcorp/v1/beyondcorp-gen.go | 2557 +-------- .../v1/certificatemanager-api.json | 287 +- .../v1/certificatemanager-gen.go | 1037 ++++ cloudbuild/v1/cloudbuild-api.json | 25 +- cloudbuild/v1/cloudbuild-gen.go | 51 +- dataform/v1beta1/dataform-api.json | 361 +- dataform/v1beta1/dataform-gen.go | 1260 +---- datamigration/v1beta1/datamigration-api.json | 12 +- datamigration/v1beta1/datamigration-gen.go | 5 + displayvideo/v1/displayvideo-api.json | 50 +- displayvideo/v1/displayvideo-gen.go | 103 +- firestore/v1/firestore-api.json | 16 +- firestore/v1/firestore-gen.go | 9 + iap/v1/iap-api.json | 6 +- iap/v1/iap-gen.go | 6 +- identitytoolkit/v1/identitytoolkit-api.json | 86 +- identitytoolkit/v1/identitytoolkit-gen.go | 57 + identitytoolkit/v2/identitytoolkit-api.json | 280 +- identitytoolkit/v2/identitytoolkit-gen.go | 663 +++ .../v1alpha1/managedidentities-api.json | 8 +- .../v1alpha1/managedidentities-gen.go | 19 +- .../v1beta1/managedidentities-api.json | 8 +- .../v1beta1/managedidentities-gen.go | 19 +- .../v1alpha1/migrationcenter-api.json | 12 +- .../v1alpha1/migrationcenter-gen.go | 12 +- networksecurity/v1/networksecurity-api.json | 1057 +++- networksecurity/v1/networksecurity-gen.go | 4817 +++++++++++++++-- retail/v2/retail-api.json | 30 +- retail/v2/retail-gen.go | 61 +- retail/v2alpha/retail-api.json | 42 +- retail/v2alpha/retail-gen.go | 74 +- retail/v2beta/retail-api.json | 30 +- retail/v2beta/retail-gen.go | 61 +- .../v1/servicemanagement-api.json | 4 +- servicemanagement/v1/servicemanagement-gen.go | 2 +- vault/v1/vault-api.json | 18 +- vault/v1/vault-gen.go | 42 +- workloadmanager/v1/workloadmanager-api.json | 579 +- workloadmanager/v1/workloadmanager-gen.go | 1778 +++++- 40 files changed, 10624 insertions(+), 5615 deletions(-) diff --git a/beyondcorp/v1/beyondcorp-api.json b/beyondcorp/v1/beyondcorp-api.json index 046cad9067d..31ed4e6de4b 100644 --- a/beyondcorp/v1/beyondcorp-api.json +++ b/beyondcorp/v1/beyondcorp-api.json @@ -1086,109 +1086,6 @@ }, "clientConnectorServices": { "methods": { - "create": { - "description": "Creates a new ClientConnectorService in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices", - "httpMethod": "POST", - "id": "beyondcorp.projects.locations.clientConnectorServices.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "clientConnectorServiceId": { - "description": "Optional. User-settable client connector service resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter. A random system generated name will be assigned if not specified by the user.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. Value for parent.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/clientConnectorServices", - "request": { - "$ref": "ClientConnectorService" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single ClientConnectorService.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", - "httpMethod": "DELETE", - "id": "beyondcorp.projects.locations.clientConnectorServices.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single ClientConnectorService.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", - "httpMethod": "GET", - "id": "beyondcorp.projects.locations.clientConnectorServices.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "ClientConnectorService" - }, - "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}/clientConnectorServices/{clientConnectorServicesId}:getIamPolicy", @@ -1220,101 +1117,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "list": { - "description": "Lists ClientConnectorServices in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices", - "httpMethod": "GET", - "id": "beyondcorp.projects.locations.clientConnectorServices.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. Filtering results.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Hint for how to order the results.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A token identifying a page of results the server should return.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. Parent value for ListClientConnectorServicesRequest.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/clientConnectorServices", - "response": { - "$ref": "ListClientConnectorServicesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single ClientConnectorService.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", - "httpMethod": "PATCH", - "id": "beyondcorp.projects.locations.clientConnectorServices.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "allowMissing": { - "description": "Optional. If set as true, will create the resource if it is not found.", - "location": "query", - "type": "boolean" - }, - "name": { - "description": "Required. Name of resource. The name is ignored during creation.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the ClientConnectorService resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. Mutable fields: display_name, ingress.config.destination_routes.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+name}", - "request": { - "$ref": "ClientConnectorService" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "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}/clientConnectorServices/{clientConnectorServicesId}:setIamPolicy", @@ -1375,181 +1177,32 @@ }, "clientGateways": { "methods": { - "create": { - "description": "Creates a new ClientGateway in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways", - "httpMethod": "POST", - "id": "beyondcorp.projects.locations.clientGateways.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "clientGatewayId": { - "description": "Optional. User-settable client gateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. Value for parent.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+parent}/clientGateways", - "request": { - "$ref": "ClientGateway" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single ClientGateway.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}", - "httpMethod": "DELETE", - "id": "beyondcorp.projects.locations.clientGateways.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the resource", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single ClientGateway.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}", - "httpMethod": "GET", - "id": "beyondcorp.projects.locations.clientGateways.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the resource", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "ClientGateway" - }, - "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}/clientGateways/{clientGatewaysId}:getIamPolicy", - "httpMethod": "GET", - "id": "beyondcorp.projects.locations.clientGateways.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "location": "query", - "type": "integer" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "response": { - "$ref": "GoogleIamV1Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists ClientGateways in a given project and location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:getIamPolicy", "httpMethod": "GET", - "id": "beyondcorp.projects.locations.clientGateways.list", + "id": "beyondcorp.projects.locations.clientGateways.getIamPolicy", "parameterOrder": [ - "parent" + "resource" ], "parameters": { - "filter": { - "description": "Optional. Filtering results.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Hint for how to order the results.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", "format": "int32", "location": "query", "type": "integer" }, - "pageToken": { - "description": "Optional. A token identifying a page of results the server should return.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. Parent value for ListClientGatewaysRequest.", + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+parent}/clientGateways", + "path": "v1/{+resource}:getIamPolicy", "response": { - "$ref": "ListClientGatewaysResponse" + "$ref": "GoogleIamV1Policy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -1741,7 +1394,7 @@ } } }, - "revision": "20230308", + "revision": "20230406", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -1901,208 +1554,6 @@ }, "type": "object" }, - "ClientConnectorService": { - "description": "Message describing ClientConnectorService object.", - "id": "ClientConnectorService", - "properties": { - "createTime": { - "description": "Output only. [Output only] Create time stamp.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "displayName": { - "description": "Optional. User-provided name. The display name should follow certain format. * Must be 6 to 30 characters in length. * Can only contain lowercase letters, numbers, and hyphens. * Must start with a letter.", - "type": "string" - }, - "egress": { - "$ref": "Egress", - "description": "Required. The details of the egress settings." - }, - "ingress": { - "$ref": "Ingress", - "description": "Required. The details of the ingress settings." - }, - "name": { - "description": "Required. Name of resource. The name is ignored during creation.", - "type": "string" - }, - "state": { - "description": "Output only. The operational state of the ClientConnectorService.", - "enum": [ - "STATE_UNSPECIFIED", - "CREATING", - "UPDATING", - "DELETING", - "RUNNING", - "DOWN", - "ERROR" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "ClientConnectorService is being created.", - "ClientConnectorService is being updated.", - "ClientConnectorService is being deleted.", - "ClientConnectorService is running.", - "ClientConnectorService is down and may be restored in the future. This happens when CCFE sends ProjectState = OFF.", - "ClientConnectorService encountered an error and is in an indeterministic state." - ], - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. [Output only] Update time stamp.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "ClientConnectorServiceOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "ClientConnectorServiceOperationMetadata", - "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" - }, - "ClientGateway": { - "description": "Message describing ClientGateway object.", - "id": "ClientGateway", - "properties": { - "clientConnectorService": { - "description": "Output only. The client connector service name that the client gateway is associated to. Client Connector Services, named as follows: `projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}`.", - "readOnly": true, - "type": "string" - }, - "createTime": { - "description": "Output only. [Output only] Create time stamp.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "id": { - "description": "Output only. A unique identifier for the instance generated by the system.", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Required. name of resource. The name is ignored during creation.", - "type": "string" - }, - "state": { - "description": "Output only. The operational state of the gateway.", - "enum": [ - "STATE_UNSPECIFIED", - "CREATING", - "UPDATING", - "DELETING", - "RUNNING", - "DOWN", - "ERROR" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "Gateway is being created.", - "Gateway is being updated.", - "Gateway is being deleted.", - "Gateway is running.", - "Gateway is down and may be restored in the future. This happens when CCFE sends ProjectState = OFF.", - "ClientGateway encountered an error and is in indeterministic state." - ], - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. [Output only] Update time stamp.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "ClientGatewayOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "ClientGatewayOperationMetadata", - "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 been cancelled successfully 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" - }, "CloudSecurityZerotrustApplinkAppConnectorProtoConnectionConfig": { "description": "ConnectionConfig represents a Connection Configuration object.", "id": "CloudSecurityZerotrustApplinkAppConnectorProtoConnectionConfig", @@ -2187,58 +1638,6 @@ "properties": {}, "type": "object" }, - "Config": { - "description": "The basic ingress config for ClientGateways.", - "id": "Config", - "properties": { - "destinationRoutes": { - "description": "Required. The settings used to configure basic ClientGateways.", - "items": { - "$ref": "DestinationRoute" - }, - "type": "array" - }, - "transportProtocol": { - "description": "Required. Immutable. The transport protocol used between the client and the server.", - "enum": [ - "TRANSPORT_PROTOCOL_UNSPECIFIED", - "TCP" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "TCP protocol." - ], - "type": "string" - } - }, - "type": "object" - }, - "DestinationRoute": { - "description": "The setting used to configure ClientGateways. It is adding routes to the client's routing table after the connection is established.", - "id": "DestinationRoute", - "properties": { - "address": { - "description": "Required. The network address of the subnet for which the packet is routed to the ClientGateway.", - "type": "string" - }, - "netmask": { - "description": "Required. The network mask of the subnet for which the packet is routed to the ClientGateway.", - "type": "string" - } - }, - "type": "object" - }, - "Egress": { - "description": "The details of the egress info. One of the following options should be set.", - "id": "Egress", - "properties": { - "peeredVpc": { - "$ref": "PeeredVpc", - "description": "A VPC from the consumer project." - } - }, - "type": "object" - }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -3512,17 +2911,6 @@ }, "type": "object" }, - "Ingress": { - "description": "Settings of how to connect to the ClientGateway. One of the following options should be set.", - "id": "Ingress", - "properties": { - "config": { - "$ref": "Config", - "description": "The basic ingress config for ClientGateways." - } - }, - "type": "object" - }, "ListAppGatewaysResponse": { "description": "Response message for BeyondCorp.ListAppGateways.", "id": "ListAppGatewaysResponse", @@ -3548,67 +2936,6 @@ }, "type": "object" }, - "ListClientConnectorServicesResponse": { - "description": "Message for response to listing ClientConnectorServices.", - "id": "ListClientConnectorServicesResponse", - "properties": { - "clientConnectorServices": { - "description": "The list of ClientConnectorService.", - "items": { - "$ref": "ClientConnectorService" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token identifying a page of results the server should return.", - "type": "string" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListClientGatewaysResponse": { - "description": "Message for response to listing ClientGateways.", - "id": "ListClientGatewaysResponse", - "properties": { - "clientGateways": { - "description": "The list of ClientGateway.", - "items": { - "$ref": "ClientGateway" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token identifying a page of results the server should return.", - "type": "string" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "PeeredVpc": { - "description": "The peered VPC owned by the consumer project.", - "id": "PeeredVpc", - "properties": { - "networkVpc": { - "description": "Required. The name of the peered VPC owned by the consumer project.", - "type": "string" - } - }, - "type": "object" - }, "Tunnelv1ProtoTunnelerError": { "description": "TunnelerError is an error proto for errors returned by the connection manager.", "id": "Tunnelv1ProtoTunnelerError", diff --git a/beyondcorp/v1/beyondcorp-gen.go b/beyondcorp/v1/beyondcorp-gen.go index b69a467d30e..c1583102465 100644 --- a/beyondcorp/v1/beyondcorp-gen.go +++ b/beyondcorp/v1/beyondcorp-gen.go @@ -408,243 +408,6 @@ func (s *AppGatewayOperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ClientConnectorService: Message describing ClientConnectorService -// object. -type ClientConnectorService struct { - // CreateTime: Output only. [Output only] Create time stamp. - CreateTime string `json:"createTime,omitempty"` - - // DisplayName: Optional. User-provided name. The display name should - // follow certain format. * Must be 6 to 30 characters in length. * Can - // only contain lowercase letters, numbers, and hyphens. * Must start - // with a letter. - DisplayName string `json:"displayName,omitempty"` - - // Egress: Required. The details of the egress settings. - Egress *Egress `json:"egress,omitempty"` - - // Ingress: Required. The details of the ingress settings. - Ingress *Ingress `json:"ingress,omitempty"` - - // Name: Required. Name of resource. The name is ignored during - // creation. - Name string `json:"name,omitempty"` - - // State: Output only. The operational state of the - // ClientConnectorService. - // - // Possible values: - // "STATE_UNSPECIFIED" - Default value. This value is unused. - // "CREATING" - ClientConnectorService is being created. - // "UPDATING" - ClientConnectorService is being updated. - // "DELETING" - ClientConnectorService is being deleted. - // "RUNNING" - ClientConnectorService is running. - // "DOWN" - ClientConnectorService is down and may be restored in the - // future. This happens when CCFE sends ProjectState = OFF. - // "ERROR" - ClientConnectorService encountered an error and is in an - // indeterministic state. - State string `json:"state,omitempty"` - - // UpdateTime: Output only. [Output only] Update time stamp. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ClientConnectorService) MarshalJSON() ([]byte, error) { - type NoMethod ClientConnectorService - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClientConnectorServiceOperationMetadata: Represents the metadata of -// the long-running operation. -type ClientConnectorServiceOperationMetadata struct { - // ApiVersion: Output only. API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - - // CreateTime: Output only. The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: Output only. The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - - // RequestedCancellation: Output only. Identifies whether the user has - // requested cancellation of the operation. Operations that have - // successfully been cancelled have Operation.error value with a - // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. - RequestedCancellation bool `json:"requestedCancellation,omitempty"` - - // StatusMessage: Output only. Human-readable status of the operation, - // if any. - StatusMessage string `json:"statusMessage,omitempty"` - - // Target: Output only. Server-defined resource path for the target of - // the operation. - Target string `json:"target,omitempty"` - - // Verb: Output only. Name of the verb executed by the operation. - Verb string `json:"verb,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ApiVersion") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ApiVersion") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ClientConnectorServiceOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod ClientConnectorServiceOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClientGateway: Message describing ClientGateway object. -type ClientGateway struct { - // ClientConnectorService: Output only. The client connector service - // name that the client gateway is associated to. Client Connector - // Services, named as follows: - // `projects/{project_id}/locations/{location_id}/client_connector_servic - // es/{client_connector_service_id}`. - ClientConnectorService string `json:"clientConnectorService,omitempty"` - - // CreateTime: Output only. [Output only] Create time stamp. - CreateTime string `json:"createTime,omitempty"` - - // Id: Output only. A unique identifier for the instance generated by - // the system. - Id string `json:"id,omitempty"` - - // Name: Required. name of resource. The name is ignored during - // creation. - Name string `json:"name,omitempty"` - - // State: Output only. The operational state of the gateway. - // - // Possible values: - // "STATE_UNSPECIFIED" - Default value. This value is unused. - // "CREATING" - Gateway is being created. - // "UPDATING" - Gateway is being updated. - // "DELETING" - Gateway is being deleted. - // "RUNNING" - Gateway is running. - // "DOWN" - Gateway is down and may be restored in the future. This - // happens when CCFE sends ProjectState = OFF. - // "ERROR" - ClientGateway encountered an error and is in - // indeterministic state. - State string `json:"state,omitempty"` - - // UpdateTime: Output only. [Output only] Update time stamp. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "ClientConnectorService") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClientConnectorService") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ClientGateway) MarshalJSON() ([]byte, error) { - type NoMethod ClientGateway - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ClientGatewayOperationMetadata: Represents the metadata of the -// long-running operation. -type ClientGatewayOperationMetadata struct { - // ApiVersion: Output only. API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - - // CreateTime: Output only. The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: Output only. The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - - // RequestedCancellation: Output only. Identifies whether the user has - // requested cancellation of the operation. Operations that have been - // cancelled successfully have Operation.error value with a - // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. - RequestedCancellation bool `json:"requestedCancellation,omitempty"` - - // StatusMessage: Output only. Human-readable status of the operation, - // if any. - StatusMessage string `json:"statusMessage,omitempty"` - - // Target: Output only. Server-defined resource path for the target of - // the operation. - Target string `json:"target,omitempty"` - - // Verb: Output only. Name of the verb executed by the operation. - Verb string `json:"verb,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ApiVersion") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ApiVersion") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ClientGatewayOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod ClientGatewayOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // CloudSecurityZerotrustApplinkAppConnectorProtoConnectionConfig: // ConnectionConfig represents a Connection Configuration object. type CloudSecurityZerotrustApplinkAppConnectorProtoConnectionConfig struct { @@ -771,109 +534,6 @@ func (s *CloudSecurityZerotrustApplinkAppConnectorProtoGateway) MarshalJSON() ([ type CloudSecurityZerotrustApplinkLogagentProtoLogAgentDetails struct { } -// Config: The basic ingress config for ClientGateways. -type Config struct { - // DestinationRoutes: Required. The settings used to configure basic - // ClientGateways. - DestinationRoutes []*DestinationRoute `json:"destinationRoutes,omitempty"` - - // TransportProtocol: Required. Immutable. The transport protocol used - // between the client and the server. - // - // Possible values: - // "TRANSPORT_PROTOCOL_UNSPECIFIED" - Default value. This value is - // unused. - // "TCP" - TCP protocol. - TransportProtocol string `json:"transportProtocol,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DestinationRoutes") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DestinationRoutes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *Config) MarshalJSON() ([]byte, error) { - type NoMethod Config - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// DestinationRoute: The setting used to configure ClientGateways. It is -// adding routes to the client's routing table after the connection is -// established. -type DestinationRoute struct { - // Address: Required. The network address of the subnet for which the - // packet is routed to the ClientGateway. - Address string `json:"address,omitempty"` - - // Netmask: Required. The network mask of the subnet for which the - // packet is routed to the ClientGateway. - Netmask string `json:"netmask,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Address") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Address") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *DestinationRoute) MarshalJSON() ([]byte, error) { - type NoMethod DestinationRoute - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// Egress: The details of the egress info. One of the following options -// should be set. -type Egress struct { - // PeeredVpc: A VPC from the consumer project. - PeeredVpc *PeeredVpc `json:"peeredVpc,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PeeredVpc") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "PeeredVpc") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Egress) MarshalJSON() ([]byte, error) { - type NoMethod Egress - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -2927,53 +2587,24 @@ func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Ingress: Settings of how to connect to the ClientGateway. One of the -// following options should be set. -type Ingress struct { - // Config: The basic ingress config for ClientGateways. - Config *Config `json:"config,omitempty"` +// ListAppGatewaysResponse: Response message for +// BeyondCorp.ListAppGateways. +type ListAppGatewaysResponse struct { + // AppGateways: A list of BeyondCorp AppGateways in the project. + AppGateways []*AppGateway `json:"appGateways,omitempty"` + + // NextPageToken: A token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: A list of locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Config") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *Ingress) MarshalJSON() ([]byte, error) { - type NoMethod Ingress - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListAppGatewaysResponse: Response message for -// BeyondCorp.ListAppGateways. -type ListAppGatewaysResponse struct { - // AppGateways: A list of BeyondCorp AppGateways in the project. - AppGateways []*AppGateway `json:"appGateways,omitempty"` - - // NextPageToken: A token to retrieve the next page of results, or empty - // if there are no more results in the list. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Unreachable: A list of locations that could not be reached. - Unreachable []string `json:"unreachable,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "AppGateways") to + // ForceSendFields is a list of field names (e.g. "AppGateways") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2996,118 +2627,6 @@ func (s *ListAppGatewaysResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListClientConnectorServicesResponse: Message for response to listing -// ClientConnectorServices. -type ListClientConnectorServicesResponse struct { - // ClientConnectorServices: The list of ClientConnectorService. - ClientConnectorServices []*ClientConnectorService `json:"clientConnectorServices,omitempty"` - - // NextPageToken: A token identifying a page of results the server - // should return. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Unreachable: Locations that could not be reached. - Unreachable []string `json:"unreachable,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. - // "ClientConnectorServices") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClientConnectorServices") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ListClientConnectorServicesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListClientConnectorServicesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListClientGatewaysResponse: Message for response to listing -// ClientGateways. -type ListClientGatewaysResponse struct { - // ClientGateways: The list of ClientGateway. - ClientGateways []*ClientGateway `json:"clientGateways,omitempty"` - - // NextPageToken: A token identifying a page of results the server - // should return. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Unreachable: Locations that could not be reached. - Unreachable []string `json:"unreachable,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "ClientGateways") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ClientGateways") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *ListClientGatewaysResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListClientGatewaysResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// PeeredVpc: The peered VPC owned by the consumer project. -type PeeredVpc struct { - // NetworkVpc: Required. The name of the peered VPC owned by the - // consumer project. - NetworkVpc string `json:"networkVpc,omitempty"` - - // ForceSendFields is a list of field names (e.g. "NetworkVpc") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NetworkVpc") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *PeeredVpc) MarshalJSON() ([]byte, error) { - type NoMethod PeeredVpc - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Tunnelv1ProtoTunnelerError: TunnelerError is an error proto for // errors returned by the connection manager. type Tunnelv1ProtoTunnelerError struct { @@ -8097,126 +7616,118 @@ func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Do(opts ...googleap } -// method id "beyondcorp.projects.locations.clientConnectorServices.create": +// method id "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy": -type ProjectsLocationsClientConnectorServicesCreateCall struct { - s *Service - parent string - clientconnectorservice *ClientConnectorService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsClientConnectorServicesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new ClientConnectorService in a given project and -// location. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - parent: Value for parent. -func (r *ProjectsLocationsClientConnectorServicesService) Create(parent string, clientconnectorservice *ClientConnectorService) *ProjectsLocationsClientConnectorServicesCreateCall { - c := &ProjectsLocationsClientConnectorServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.clientconnectorservice = clientconnectorservice - return c -} - -// ClientConnectorServiceId sets the optional parameter -// "clientConnectorServiceId": User-settable client connector service -// resource ID. * Must start with a letter. * Must contain between 4-63 -// characters from `/a-z-/`. * Must end with a number or a letter. A -// random system generated name will be assigned if not specified by the -// user. -func (c *ProjectsLocationsClientConnectorServicesCreateCall) ClientConnectorServiceId(clientConnectorServiceId string) *ProjectsLocationsClientConnectorServicesCreateCall { - c.urlParams_.Set("clientConnectorServiceId", clientConnectorServiceId) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and the -// request times out. If you make the request again with the same -// request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. -// This prevents clients from accidentally creating duplicate -// commitments. The request ID must be a valid UUID with the exception -// that zero UUID is not supported -// (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsClientConnectorServicesCreateCall) RequestId(requestId string) *ProjectsLocationsClientConnectorServicesCreateCall { - c.urlParams_.Set("requestId", requestId) +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsClientConnectorServicesService) GetIamPolicy(resource string) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { + c := &ProjectsLocationsClientConnectorServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsClientConnectorServicesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientConnectorServicesCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientConnectorServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesCreateCall { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsClientConnectorServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesCreateCall { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsClientConnectorServicesCreateCall) Header() http.Header { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientconnectorservice) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clientConnectorServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8235,7 +7746,7 @@ func (c *ProjectsLocationsClientConnectorServicesCreateCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8247,43 +7758,31 @@ func (c *ProjectsLocationsClientConnectorServicesCreateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Creates a new ClientConnectorService in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.clientConnectorServices.create", + // "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}/clientConnectorServices/{clientConnectorServicesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "clientConnectorServiceId": { - // "description": "Optional. User-settable client connector service resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter. A random system generated name will be assigned if not specified by the user.", + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "parent": { - // "description": "Required. Value for parent.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1/{+parent}/clientConnectorServices", - // "request": { - // "$ref": "ClientConnectorService" - // }, + // "path": "v1/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8292,55 +7791,36 @@ func (c *ProjectsLocationsClientConnectorServicesCreateCall) Do(opts ...googleap } -// method id "beyondcorp.projects.locations.clientConnectorServices.delete": +// method id "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy": -type ProjectsLocationsClientConnectorServicesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsClientConnectorServicesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single ClientConnectorService. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. // -// - name: Name of the resource. -func (r *ProjectsLocationsClientConnectorServicesService) Delete(name string) *ProjectsLocationsClientConnectorServicesDeleteCall { - c := &ProjectsLocationsClientConnectorServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes after the first request. For example, -// consider a situation where you make an initial request and the -// request times out. If you make the request again with the same -// request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. -// This prevents clients from accidentally creating duplicate -// commitments. The request ID must be a valid UUID with the exception -// that zero UUID is not supported -// (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsClientConnectorServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsClientConnectorServicesDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsClientConnectorServicesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientConnectorServicesDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsClientConnectorServicesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { + c := &ProjectsLocationsClientConnectorServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesDeleteCall { +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8348,21 +7828,21 @@ func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Fields(s ...googlea // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesDeleteCall { +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8370,29 +7850,34 @@ func (c *ProjectsLocationsClientConnectorServicesDeleteCall) doRequest(alt strin } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8411,7 +7896,7 @@ func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8423,35 +7908,28 @@ func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Do(opts ...googleap } return ret, nil // { - // "description": "Deletes a single ClientConnectorService.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", - // "httpMethod": "DELETE", - // "id": "beyondcorp.projects.locations.clientConnectorServices.delete", + // "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}/clientConnectorServices/{clientConnectorServicesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the resource.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8460,95 +7938,97 @@ func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Do(opts ...googleap } -// method id "beyondcorp.projects.locations.clientConnectorServices.get": +// method id "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions": -type ProjectsLocationsClientConnectorServicesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsClientConnectorServicesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single ClientConnectorService. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - name: Name of the resource. -func (r *ProjectsLocationsClientConnectorServicesService) Get(name string) *ProjectsLocationsClientConnectorServicesGetCall { - c := &ProjectsLocationsClientConnectorServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsClientConnectorServicesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { + c := &ProjectsLocationsClientConnectorServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientConnectorServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesGetCall { +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsClientConnectorServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientConnectorServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsClientConnectorServicesGetCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesGetCall { +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsClientConnectorServicesGetCall) Header() http.Header { +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.get" call. -// Exactly one of *ClientConnectorService or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ClientConnectorService.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesGetCall) Do(opts ...googleapi.CallOption) (*ClientConnectorService, error) { +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8567,7 +8047,7 @@ func (c *ProjectsLocationsClientConnectorServicesGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ClientConnectorService{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8579,25 +8059,28 @@ func (c *ProjectsLocationsClientConnectorServicesGetCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Gets details of a single ClientConnectorService.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientConnectorServices.get", + // "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}/clientConnectorServices/{clientConnectorServicesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the resource.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "ClientConnectorService" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8606,9 +8089,9 @@ func (c *ProjectsLocationsClientConnectorServicesGetCall) Do(opts ...googleapi.C } -// method id "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy": +// method id "beyondcorp.projects.locations.clientGateways.getIamPolicy": -type ProjectsLocationsClientConnectorServicesGetIamPolicyCall struct { +type ProjectsLocationsClientGatewaysGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -8625,8 +8108,8 @@ type ProjectsLocationsClientConnectorServicesGetIamPolicyCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsClientConnectorServicesService) GetIamPolicy(resource string) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { - c := &ProjectsLocationsClientConnectorServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsClientGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsClientGatewaysGetIamPolicyCall { + c := &ProjectsLocationsClientGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -8644,7 +8127,7 @@ func (r *ProjectsLocationsClientConnectorServicesService) GetIamPolicy(resource // which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsClientGatewaysGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -8652,7 +8135,7 @@ func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) OptionsReques // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8662,7 +8145,7 @@ func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Fields(s ...g // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientGatewaysGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -8670,21 +8153,21 @@ func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) IfNoneMatch(e // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -8710,14 +8193,14 @@ func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.clientGateways.getIamPolicy" call. // Exactly one of *GoogleIamV1Policy or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8749,9 +8232,9 @@ func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Do(opts ...go return ret, nil // { // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:getIamPolicy", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:getIamPolicy", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy", + // "id": "beyondcorp.projects.locations.clientGateways.getIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -8765,7 +8248,7 @@ func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Do(opts ...go // "resource": { // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", // "required": true, // "type": "string" // } @@ -8781,1626 +8264,6 @@ func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Do(opts ...go } -// method id "beyondcorp.projects.locations.clientConnectorServices.list": - -type ProjectsLocationsClientConnectorServicesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists ClientConnectorServices in a given project and location. -// -// - parent: Parent value for ListClientConnectorServicesRequest. -func (r *ProjectsLocationsClientConnectorServicesService) List(parent string) *ProjectsLocationsClientConnectorServicesListCall { - c := &ProjectsLocationsClientConnectorServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results. -func (c *ProjectsLocationsClientConnectorServicesListCall) Filter(filter string) *ProjectsLocationsClientConnectorServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint for how to order -// the results. -func (c *ProjectsLocationsClientConnectorServicesListCall) OrderBy(orderBy string) *ProjectsLocationsClientConnectorServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. -func (c *ProjectsLocationsClientConnectorServicesListCall) PageSize(pageSize int64) *ProjectsLocationsClientConnectorServicesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results the server should return. -func (c *ProjectsLocationsClientConnectorServicesListCall) PageToken(pageToken string) *ProjectsLocationsClientConnectorServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsClientConnectorServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsClientConnectorServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientConnectorServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsClientConnectorServicesListCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsClientConnectorServicesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClientConnectorServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clientConnectorServices") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.list" call. -// Exactly one of *ListClientConnectorServicesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListClientConnectorServicesResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsClientConnectorServicesListCall) Do(opts ...googleapi.CallOption) (*ListClientConnectorServicesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListClientConnectorServicesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists ClientConnectorServices in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientConnectorServices.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. Filtering results.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Hint for how to order the results.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A token identifying a page of results the server should return.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Parent value for ListClientConnectorServicesRequest.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/clientConnectorServices", - // "response": { - // "$ref": "ListClientConnectorServicesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsClientConnectorServicesListCall) Pages(ctx context.Context, f func(*ListClientConnectorServicesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "beyondcorp.projects.locations.clientConnectorServices.patch": - -type ProjectsLocationsClientConnectorServicesPatchCall struct { - s *Service - name string - clientconnectorservice *ClientConnectorService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single ClientConnectorService. -// -// - name: Name of resource. The name is ignored during creation. -func (r *ProjectsLocationsClientConnectorServicesService) Patch(name string, clientconnectorservice *ClientConnectorService) *ProjectsLocationsClientConnectorServicesPatchCall { - c := &ProjectsLocationsClientConnectorServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.clientconnectorservice = clientconnectorservice - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set as -// true, will create the resource if it is not found. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClientConnectorServicesPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and the -// request times out. If you make the request again with the same -// request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. -// This prevents clients from accidentally creating duplicate -// commitments. The request ID must be a valid UUID with the exception -// that zero UUID is not supported -// (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsClientConnectorServicesPatchCall) RequestId(requestId string) *ProjectsLocationsClientConnectorServicesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Field -// mask is used to specify the fields to be overwritten in the -// ClientConnectorService resource by the update. The fields specified -// in the update_mask are relative to the resource, not the full -// request. A field will be overwritten if it is in the mask. If the -// user does not provide a mask then all fields will be overwritten. -// Mutable fields: display_name, ingress.config.destination_routes. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClientConnectorServicesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientConnectorServicesPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClientConnectorServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientconnectorservice) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the parameters of a single ClientConnectorService.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", - // "httpMethod": "PATCH", - // "id": "beyondcorp.projects.locations.clientConnectorServices.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "allowMissing": { - // "description": "Optional. If set as true, will create the resource if it is not found.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "Required. Name of resource. The name is ignored during creation.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Field mask is used to specify the fields to be overwritten in the ClientConnectorService resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. Mutable fields: display_name, ingress.config.destination_routes.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "v1/{+name}", - // "request": { - // "$ref": "ClientConnectorService" - // }, - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy": - -type ProjectsLocationsClientConnectorServicesSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. -// -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsClientConnectorServicesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { - c := &ProjectsLocationsClientConnectorServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleIamV1Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" - // }, - // "response": { - // "$ref": "GoogleIamV1Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions": - -type ProjectsLocationsClientConnectorServicesTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. -// -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsClientConnectorServicesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { - c := &ProjectsLocationsClientConnectorServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions" call. -// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleIamV1TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.clientGateways.create": - -type ProjectsLocationsClientGatewaysCreateCall struct { - s *Service - parent string - clientgateway *ClientGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new ClientGateway in a given project and location. -// -// - parent: Value for parent. -func (r *ProjectsLocationsClientGatewaysService) Create(parent string, clientgateway *ClientGateway) *ProjectsLocationsClientGatewaysCreateCall { - c := &ProjectsLocationsClientGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.clientgateway = clientgateway - return c -} - -// ClientGatewayId sets the optional parameter "clientGatewayId": -// User-settable client gateway resource ID. * Must start with a letter. -// * Must contain between 4-63 characters from `/a-z-/`. * Must end with -// a number or a letter. -func (c *ProjectsLocationsClientGatewaysCreateCall) ClientGatewayId(clientGatewayId string) *ProjectsLocationsClientGatewaysCreateCall { - c.urlParams_.Set("clientGatewayId", clientGatewayId) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and the -// request times out. If you make the request again with the same -// request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. -// This prevents clients from accidentally creating duplicate -// commitments. The request ID must be a valid UUID with the exception -// that zero UUID is not supported -// (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsClientGatewaysCreateCall) RequestId(requestId string) *ProjectsLocationsClientGatewaysCreateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsClientGatewaysCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientGatewaysCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsClientGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsClientGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsClientGatewaysCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClientGatewaysCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientgateway) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clientGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.clientGateways.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new ClientGateway in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.clientGateways.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "clientGatewayId": { - // "description": "Optional. User-settable client gateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Value for parent.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "v1/{+parent}/clientGateways", - // "request": { - // "$ref": "ClientGateway" - // }, - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.clientGateways.delete": - -type ProjectsLocationsClientGatewaysDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single ClientGateway. -// -// - name: Name of the resource. -func (r *ProjectsLocationsClientGatewaysService) Delete(name string) *ProjectsLocationsClientGatewaysDeleteCall { - c := &ProjectsLocationsClientGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes after the first request. For example, -// consider a situation where you make an initial request and the -// request times out. If you make the request again with the same -// request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. -// This prevents clients from accidentally creating duplicate -// commitments. The request ID must be a valid UUID with the exception -// that zero UUID is not supported -// (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsClientGatewaysDeleteCall) RequestId(requestId string) *ProjectsLocationsClientGatewaysDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsClientGatewaysDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientGatewaysDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsClientGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsClientGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsClientGatewaysDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClientGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.clientGateways.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a single ClientGateway.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}", - // "httpMethod": "DELETE", - // "id": "beyondcorp.projects.locations.clientGateways.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Name of the resource", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.clientGateways.get": - -type ProjectsLocationsClientGatewaysGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single ClientGateway. -// -// - name: Name of the resource. -func (r *ProjectsLocationsClientGatewaysService) Get(name string) *ProjectsLocationsClientGatewaysGetCall { - c := &ProjectsLocationsClientGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsClientGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsClientGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsClientGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsClientGatewaysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClientGatewaysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.clientGateways.get" call. -// Exactly one of *ClientGateway or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ClientGateway.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ClientGateway, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ClientGateway{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets details of a single ClientGateway.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientGateways.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Name of the resource", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "ClientGateway" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.clientGateways.getIamPolicy": - -type ProjectsLocationsClientGatewaysGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. -// -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsClientGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsClientGatewaysGetIamPolicyCall { - c := &ProjectsLocationsClientGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsClientGatewaysGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientGatewaysGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.clientGateways.getIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleIamV1Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientGateways.getIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+resource}:getIamPolicy", - // "response": { - // "$ref": "GoogleIamV1Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.clientGateways.list": - -type ProjectsLocationsClientGatewaysListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists ClientGateways in a given project and location. -// -// - parent: Parent value for ListClientGatewaysRequest. -func (r *ProjectsLocationsClientGatewaysService) List(parent string) *ProjectsLocationsClientGatewaysListCall { - c := &ProjectsLocationsClientGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results. -func (c *ProjectsLocationsClientGatewaysListCall) Filter(filter string) *ProjectsLocationsClientGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint for how to order -// the results. -func (c *ProjectsLocationsClientGatewaysListCall) OrderBy(orderBy string) *ProjectsLocationsClientGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. -func (c *ProjectsLocationsClientGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsClientGatewaysListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results the server should return. -func (c *ProjectsLocationsClientGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsClientGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsClientGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsClientGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientGatewaysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsClientGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysListCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsClientGatewaysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsClientGatewaysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clientGateways") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.clientGateways.list" call. -// Exactly one of *ListClientGatewaysResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListClientGatewaysResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysListCall) Do(opts ...googleapi.CallOption) (*ListClientGatewaysResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListClientGatewaysResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists ClientGateways in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientGateways", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientGateways.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "filter": { - // "description": "Optional. Filtering results.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Hint for how to order the results.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A token identifying a page of results the server should return.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Parent value for ListClientGatewaysRequest.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1/{+parent}/clientGateways", - // "response": { - // "$ref": "ListClientGatewaysResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsClientGatewaysListCall) Pages(ctx context.Context, f func(*ListClientGatewaysResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - // method id "beyondcorp.projects.locations.clientGateways.setIamPolicy": type ProjectsLocationsClientGatewaysSetIamPolicyCall struct { diff --git a/certificatemanager/v1/certificatemanager-api.json b/certificatemanager/v1/certificatemanager-api.json index 2c6a84c97f3..3972fada250 100644 --- a/certificatemanager/v1/certificatemanager-api.json +++ b/certificatemanager/v1/certificatemanager-api.json @@ -1102,13 +1102,185 @@ ] } } + }, + "trustConfigs": { + "methods": { + "create": { + "description": "Creates a new TrustConfig in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/trustConfigs", + "httpMethod": "POST", + "id": "certificatemanager.projects.locations.trustConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the TrustConfig. Must be in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "trustConfigId": { + "description": "Required. A user-provided name of the TrustConfig.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/trustConfigs", + "request": { + "$ref": "TrustConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single TrustConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/trustConfigs/{trustConfigsId}", + "httpMethod": "DELETE", + "id": "certificatemanager.projects.locations.trustConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "The current etag of the TrustConfig. If an etag is provided and does not match the current etag of the resource, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. A name of the TrustConfig to delete. Must be in the format `projects/*/locations/*/trustConfigs/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single TrustConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/trustConfigs/{trustConfigsId}", + "httpMethod": "GET", + "id": "certificatemanager.projects.locations.trustConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the TrustConfig to describe. Must be in the format `projects/*/locations/*/trustConfigs/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "TrustConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists TrustConfigs in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/trustConfigs", + "httpMethod": "GET", + "id": "certificatemanager.projects.locations.trustConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filter expression to restrict the TrustConfigs returned.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "A list of TrustConfig field names used to specify the order of the returned results. The default sorting order is ascending. To specify descending order for a field, add a suffix \" desc\".", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of TrustConfigs to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListTrustConfigsResponse`. Indicates that this is a continuation of a prior `ListTrustConfigs` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the TrustConfigs should be listed, specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/trustConfigs", + "response": { + "$ref": "ListTrustConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a TrustConfig.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/trustConfigs/{trustConfigsId}", + "httpMethod": "PATCH", + "id": "certificatemanager.projects.locations.trustConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "A user-defined name of the trust config. TrustConfig names must be unique globally and match pattern `projects/*/locations/*/trustConfigs/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "TrustConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } } } }, - "revision": "20230315", + "revision": "20230407", "rootUrl": "https://certificatemanager.googleapis.com/", "schemas": { "AuthorizationAttemptInfo": { @@ -1534,6 +1706,17 @@ }, "type": "object" }, + "IntermediateCA": { + "description": "Defines an intermediate CA.", + "id": "IntermediateCA", + "properties": { + "pemCertificate": { + "description": "PEM intermediate certificate used for building up paths for validation. Each certificate provided in PEM format may occupy up to 5kB.", + "type": "string" + } + }, + "type": "object" + }, "IpConfig": { "description": "Defines IP configuration where this Certificate Map is serving.", "id": "IpConfig", @@ -1716,6 +1899,31 @@ }, "type": "object" }, + "ListTrustConfigsResponse": { + "description": "Response for the `ListTrustConfigs` method.", + "id": "ListTrustConfigsResponse", + "properties": { + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", + "type": "string" + }, + "trustConfigs": { + "description": "A list of TrustConfigs for the parent resource.", + "items": { + "$ref": "TrustConfig" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Location": { "description": "A resource that represents Google Cloud Platform location.", "id": "Location", @@ -1945,6 +2153,83 @@ } }, "type": "object" + }, + "TrustAnchor": { + "description": "Defines a trust anchor.", + "id": "TrustAnchor", + "properties": { + "pemCertificate": { + "description": "PEM root certificate of the PKI used for validation. Each certificate provided in PEM format may occupy up to 5kB.", + "type": "string" + } + }, + "type": "object" + }, + "TrustConfig": { + "description": "Defines a trust config.", + "id": "TrustConfig", + "properties": { + "createTime": { + "description": "Output only. The creation timestamp of a TrustConfig.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "One or more paragraphs of text description of a TrustConfig.", + "type": "string" + }, + "etag": { + "description": "This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of labels associated with a TrustConfig.", + "type": "object" + }, + "name": { + "description": "A user-defined name of the trust config. TrustConfig names must be unique globally and match pattern `projects/*/locations/*/trustConfigs/*`.", + "type": "string" + }, + "trustStores": { + "description": "Set of trust stores to perform validation against. This field is supported when TrustConfig is configured with Load Balancers, currently not supported for SPIFFE certificate validation. Only one TrustStore specified is currently allowed.", + "items": { + "$ref": "TrustStore" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The last update timestamp of a TrustConfig.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "TrustStore": { + "description": "Defines a trust store.", + "id": "TrustStore", + "properties": { + "intermediateCas": { + "description": "Set of intermediate CA certificates used for the path building phase of chain validation. The field is currently not supported if TrustConfig is used for the workload certificate feature.", + "items": { + "$ref": "IntermediateCA" + }, + "type": "array" + }, + "trustAnchors": { + "description": "List of Trust Anchors to be used while performing validation against a given TrustStore.", + "items": { + "$ref": "TrustAnchor" + }, + "type": "array" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/certificatemanager/v1/certificatemanager-gen.go b/certificatemanager/v1/certificatemanager-gen.go index 9370c58e5e0..3048bcdb184 100644 --- a/certificatemanager/v1/certificatemanager-gen.go +++ b/certificatemanager/v1/certificatemanager-gen.go @@ -157,6 +157,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Certificates = NewProjectsLocationsCertificatesService(s) rs.DnsAuthorizations = NewProjectsLocationsDnsAuthorizationsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.TrustConfigs = NewProjectsLocationsTrustConfigsService(s) return rs } @@ -172,6 +173,8 @@ type ProjectsLocationsService struct { DnsAuthorizations *ProjectsLocationsDnsAuthorizationsService Operations *ProjectsLocationsOperationsService + + TrustConfigs *ProjectsLocationsTrustConfigsService } func NewProjectsLocationsCertificateIssuanceConfigsService(s *Service) *ProjectsLocationsCertificateIssuanceConfigsService { @@ -231,6 +234,15 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsTrustConfigsService(s *Service) *ProjectsLocationsTrustConfigsService { + rs := &ProjectsLocationsTrustConfigsService{s: s} + return rs +} + +type ProjectsLocationsTrustConfigsService struct { + s *Service +} + // AuthorizationAttemptInfo: State of the latest attempt to authorize a // domain for certificate issuance. type AuthorizationAttemptInfo struct { @@ -791,6 +803,37 @@ func (s *GclbTarget) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// IntermediateCA: Defines an intermediate CA. +type IntermediateCA struct { + // PemCertificate: PEM intermediate certificate used for building up + // paths for validation. Each certificate provided in PEM format may + // occupy up to 5kB. + PemCertificate string `json:"pemCertificate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PemCertificate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PemCertificate") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *IntermediateCA) MarshalJSON() ([]byte, error) { + type NoMethod IntermediateCA + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // IpConfig: Defines IP configuration where this Certificate Map is // serving. type IpConfig struct { @@ -1115,6 +1158,47 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListTrustConfigsResponse: Response for the `ListTrustConfigs` method. +type ListTrustConfigsResponse struct { + // NextPageToken: If there might be more results than those appearing in + // this response, then `next_page_token` is included. To get the next + // set of results, call this method again using the value of + // `next_page_token` as `page_token`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // TrustConfigs: A list of TrustConfigs for the parent resource. + TrustConfigs []*TrustConfig `json:"trustConfigs,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListTrustConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListTrustConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Location: A resource that represents Google Cloud Platform location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby @@ -1471,6 +1555,130 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TrustAnchor: Defines a trust anchor. +type TrustAnchor struct { + // PemCertificate: PEM root certificate of the PKI used for validation. + // Each certificate provided in PEM format may occupy up to 5kB. + PemCertificate string `json:"pemCertificate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PemCertificate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PemCertificate") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TrustAnchor) MarshalJSON() ([]byte, error) { + type NoMethod TrustAnchor + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TrustConfig: Defines a trust config. +type TrustConfig struct { + // CreateTime: Output only. The creation timestamp of a TrustConfig. + CreateTime string `json:"createTime,omitempty"` + + // Description: One or more paragraphs of text description of a + // TrustConfig. + Description string `json:"description,omitempty"` + + // Etag: This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure + // the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + + // Labels: Set of labels associated with a TrustConfig. + Labels map[string]string `json:"labels,omitempty"` + + // Name: A user-defined name of the trust config. TrustConfig names must + // be unique globally and match pattern + // `projects/*/locations/*/trustConfigs/*`. + Name string `json:"name,omitempty"` + + // TrustStores: Set of trust stores to perform validation against. This + // field is supported when TrustConfig is configured with Load + // Balancers, currently not supported for SPIFFE certificate validation. + // Only one TrustStore specified is currently allowed. + TrustStores []*TrustStore `json:"trustStores,omitempty"` + + // UpdateTime: Output only. The last update timestamp of a TrustConfig. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TrustConfig) MarshalJSON() ([]byte, error) { + type NoMethod TrustConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TrustStore: Defines a trust store. +type TrustStore struct { + // IntermediateCas: Set of intermediate CA certificates used for the + // path building phase of chain validation. The field is currently not + // supported if TrustConfig is used for the workload certificate + // feature. + IntermediateCas []*IntermediateCA `json:"intermediateCas,omitempty"` + + // TrustAnchors: List of Trust Anchors to be used while performing + // validation against a given TrustStore. + TrustAnchors []*TrustAnchor `json:"trustAnchors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IntermediateCas") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IntermediateCas") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TrustStore) MarshalJSON() ([]byte, error) { + type NoMethod TrustStore + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "certificatemanager.projects.locations.get": type ProjectsLocationsGetCall struct { @@ -6399,3 +6607,832 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( c.PageToken(x.NextPageToken) } } + +// method id "certificatemanager.projects.locations.trustConfigs.create": + +type ProjectsLocationsTrustConfigsCreateCall struct { + s *Service + parent string + trustconfig *TrustConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new TrustConfig in a given project and location. +// +// - parent: The parent resource of the TrustConfig. Must be in the +// format `projects/*/locations/*`. +func (r *ProjectsLocationsTrustConfigsService) Create(parent string, trustconfig *TrustConfig) *ProjectsLocationsTrustConfigsCreateCall { + c := &ProjectsLocationsTrustConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.trustconfig = trustconfig + return c +} + +// TrustConfigId sets the optional parameter "trustConfigId": Required. +// A user-provided name of the TrustConfig. +func (c *ProjectsLocationsTrustConfigsCreateCall) TrustConfigId(trustConfigId string) *ProjectsLocationsTrustConfigsCreateCall { + c.urlParams_.Set("trustConfigId", trustConfigId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTrustConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTrustConfigsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTrustConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsTrustConfigsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTrustConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTrustConfigsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.trustconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trustConfigs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "certificatemanager.projects.locations.trustConfigs.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsTrustConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new TrustConfig in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/trustConfigs", + // "httpMethod": "POST", + // "id": "certificatemanager.projects.locations.trustConfigs.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource of the TrustConfig. Must be in the format `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "trustConfigId": { + // "description": "Required. A user-provided name of the TrustConfig.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/trustConfigs", + // "request": { + // "$ref": "TrustConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "certificatemanager.projects.locations.trustConfigs.delete": + +type ProjectsLocationsTrustConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single TrustConfig. +// +// - name: A name of the TrustConfig to delete. Must be in the format +// `projects/*/locations/*/trustConfigs/*`. +func (r *ProjectsLocationsTrustConfigsService) Delete(name string) *ProjectsLocationsTrustConfigsDeleteCall { + c := &ProjectsLocationsTrustConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// TrustConfig. If an etag is provided and does not match the current +// etag of the resource, deletion will be blocked and an ABORTED error +// will be returned. +func (c *ProjectsLocationsTrustConfigsDeleteCall) Etag(etag string) *ProjectsLocationsTrustConfigsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTrustConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTrustConfigsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTrustConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTrustConfigsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTrustConfigsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTrustConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "certificatemanager.projects.locations.trustConfigs.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsTrustConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single TrustConfig.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/trustConfigs/{trustConfigsId}", + // "httpMethod": "DELETE", + // "id": "certificatemanager.projects.locations.trustConfigs.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "The current etag of the TrustConfig. If an etag is provided and does not match the current etag of the resource, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. A name of the TrustConfig to delete. Must be in the format `projects/*/locations/*/trustConfigs/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "certificatemanager.projects.locations.trustConfigs.get": + +type ProjectsLocationsTrustConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single TrustConfig. +// +// - name: A name of the TrustConfig to describe. Must be in the format +// `projects/*/locations/*/trustConfigs/*`. +func (r *ProjectsLocationsTrustConfigsService) Get(name string) *ProjectsLocationsTrustConfigsGetCall { + c := &ProjectsLocationsTrustConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTrustConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTrustConfigsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsTrustConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTrustConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTrustConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsTrustConfigsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTrustConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTrustConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "certificatemanager.projects.locations.trustConfigs.get" call. +// Exactly one of *TrustConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *TrustConfig.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsTrustConfigsGetCall) Do(opts ...googleapi.CallOption) (*TrustConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TrustConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single TrustConfig.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/trustConfigs/{trustConfigsId}", + // "httpMethod": "GET", + // "id": "certificatemanager.projects.locations.trustConfigs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the TrustConfig to describe. Must be in the format `projects/*/locations/*/trustConfigs/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "TrustConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "certificatemanager.projects.locations.trustConfigs.list": + +type ProjectsLocationsTrustConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists TrustConfigs in a given project and location. +// +// - parent: The project and location from which the TrustConfigs should +// be listed, specified in the format `projects/*/locations/*`. +func (r *ProjectsLocationsTrustConfigsService) List(parent string) *ProjectsLocationsTrustConfigsListCall { + c := &ProjectsLocationsTrustConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter expression to +// restrict the TrustConfigs returned. +func (c *ProjectsLocationsTrustConfigsListCall) Filter(filter string) *ProjectsLocationsTrustConfigsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A list of TrustConfig +// field names used to specify the order of the returned results. The +// default sorting order is ascending. To specify descending order for a +// field, add a suffix " desc". +func (c *ProjectsLocationsTrustConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsTrustConfigsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// TrustConfigs to return per call. +func (c *ProjectsLocationsTrustConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsTrustConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListTrustConfigsResponse`. Indicates that this is a +// continuation of a prior `ListTrustConfigs` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsTrustConfigsListCall) PageToken(pageToken string) *ProjectsLocationsTrustConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTrustConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTrustConfigsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsTrustConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTrustConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTrustConfigsListCall) Context(ctx context.Context) *ProjectsLocationsTrustConfigsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTrustConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTrustConfigsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trustConfigs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "certificatemanager.projects.locations.trustConfigs.list" call. +// Exactly one of *ListTrustConfigsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListTrustConfigsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsTrustConfigsListCall) Do(opts ...googleapi.CallOption) (*ListTrustConfigsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListTrustConfigsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists TrustConfigs in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/trustConfigs", + // "httpMethod": "GET", + // "id": "certificatemanager.projects.locations.trustConfigs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filter expression to restrict the TrustConfigs returned.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "A list of TrustConfig field names used to specify the order of the returned results. The default sorting order is ascending. To specify descending order for a field, add a suffix \" desc\".", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of TrustConfigs to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListTrustConfigsResponse`. Indicates that this is a continuation of a prior `ListTrustConfigs` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the TrustConfigs should be listed, specified in the format `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/trustConfigs", + // "response": { + // "$ref": "ListTrustConfigsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsTrustConfigsListCall) Pages(ctx context.Context, f func(*ListTrustConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "certificatemanager.projects.locations.trustConfigs.patch": + +type ProjectsLocationsTrustConfigsPatchCall struct { + s *Service + name string + trustconfig *TrustConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a TrustConfig. +// +// - name: A user-defined name of the trust config. TrustConfig names +// must be unique globally and match pattern +// `projects/*/locations/*/trustConfigs/*`. +func (r *ProjectsLocationsTrustConfigsService) Patch(name string, trustconfig *TrustConfig) *ProjectsLocationsTrustConfigsPatchCall { + c := &ProjectsLocationsTrustConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.trustconfig = trustconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// update mask applies to the resource. For the `FieldMask` definition, +// see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. +func (c *ProjectsLocationsTrustConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTrustConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTrustConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTrustConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTrustConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsTrustConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTrustConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTrustConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.trustconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "certificatemanager.projects.locations.trustConfigs.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsTrustConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a TrustConfig.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/trustConfigs/{trustConfigsId}", + // "httpMethod": "PATCH", + // "id": "certificatemanager.projects.locations.trustConfigs.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "A user-defined name of the trust config. TrustConfig names must be unique globally and match pattern `projects/*/locations/*/trustConfigs/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "TrustConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/cloudbuild/v1/cloudbuild-api.json b/cloudbuild/v1/cloudbuild-api.json index eb2e5f3fd07..be5e5c95cda 100644 --- a/cloudbuild/v1/cloudbuild-api.json +++ b/cloudbuild/v1/cloudbuild-api.json @@ -2295,7 +2295,7 @@ } } }, - "revision": "20230330", + "revision": "20230406", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ApprovalConfig": { @@ -4039,6 +4039,25 @@ }, "type": "object" }, + "GitSource": { + "description": "Location of the source in any accessible Git repository.", + "id": "GitSource", + "properties": { + "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" + }, + "revision": { + "description": "The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. Cloud Build uses `git fetch` to fetch the revision from the Git repository; therefore make sure that the string you provide for `revision` is parsable by the command. For information on string values accepted by `git fetch`, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information on `git fetch`, see https://git-scm.com/docs/git-fetch.", + "type": "string" + }, + "url": { + "description": "Location of the Git repo to build. This will be used as a `git remote`, see https://git-scm.com/docs/git-remote.", + "type": "string" + } + }, + "type": "object" + }, "Hash": { "description": "Container message for hash values.", "id": "Hash", @@ -4807,6 +4826,10 @@ "description": "Location of the source in a supported storage service.", "id": "Source", "properties": { + "gitSource": { + "$ref": "GitSource", + "description": "If provided, get the source from this Git repository." + }, "repoSource": { "$ref": "RepoSource", "description": "If provided, get the source from this location in a Cloud Source Repository." diff --git a/cloudbuild/v1/cloudbuild-gen.go b/cloudbuild/v1/cloudbuild-gen.go index 0d10a62d81f..535fc721a09 100644 --- a/cloudbuild/v1/cloudbuild-gen.go +++ b/cloudbuild/v1/cloudbuild-gen.go @@ -2984,6 +2984,50 @@ func (s *GitRepoSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GitSource: Location of the source in any accessible Git repository. +type GitSource struct { + // Dir: 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 `json:"dir,omitempty"` + + // Revision: The revision to fetch from the Git repository such as a + // branch, a tag, a commit SHA, or any Git ref. Cloud Build uses `git + // fetch` to fetch the revision from the Git repository; therefore make + // sure that the string you provide for `revision` is parsable by the + // command. For information on string values accepted by `git fetch`, + // see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For + // information on `git fetch`, see https://git-scm.com/docs/git-fetch. + Revision string `json:"revision,omitempty"` + + // Url: Location of the Git repo to build. This will be used as a `git + // remote`, see https://git-scm.com/docs/git-remote. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dir") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dir") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GitSource) MarshalJSON() ([]byte, error) { + type NoMethod GitSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Hash: Container message for hash values. type Hash struct { // Type: The type of hash that was performed. @@ -4360,6 +4404,9 @@ func (s *ServiceDirectoryConfig) MarshalJSON() ([]byte, error) { // Source: Location of the source in a supported storage service. type Source struct { + // GitSource: If provided, get the source from this Git repository. + GitSource *GitSource `json:"gitSource,omitempty"` + // RepoSource: If provided, get the source from this location in a Cloud // Source Repository. RepoSource *RepoSource `json:"repoSource,omitempty"` @@ -4374,7 +4421,7 @@ type Source struct { // (https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). StorageSourceManifest *StorageSourceManifest `json:"storageSourceManifest,omitempty"` - // ForceSendFields is a list of field names (e.g. "RepoSource") to + // ForceSendFields is a list of field names (e.g. "GitSource") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4382,7 +4429,7 @@ type Source struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RepoSource") to include in + // NullFields is a list of field names (e.g. "GitSource") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as diff --git a/dataform/v1beta1/dataform-api.json b/dataform/v1beta1/dataform-api.json index e23bbde1b4d..60b5b7b7c7c 100644 --- a/dataform/v1beta1/dataform-api.json +++ b/dataform/v1beta1/dataform-api.json @@ -147,11 +147,6 @@ "location": "query", "type": "string" }, - "includeUnrevealedLocations": { - "description": "If true, the returned list will include locations which are not yet revealed.", - "location": "query", - "type": "boolean" - }, "name": { "description": "The resource that owns the locations collection, if applicable.", "location": "path", @@ -183,59 +178,6 @@ "resources": { "repositories": { "methods": { - "commit": { - "description": "Applies a Git commit to a Repository. The Repository must not have a value for `git_remote_settings.url`.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:commit", - "httpMethod": "POST", - "id": "dataform.projects.locations.repositories.commit", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The repository's name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}:commit", - "request": { - "$ref": "CommitRepositoryChangesRequest" - }, - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "computeAccessTokenStatus": { - "description": "Computes a Repository's Git access token status.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:computeAccessTokenStatus", - "httpMethod": "GET", - "id": "dataform.projects.locations.repositories.computeAccessTokenStatus", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The repository's name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}:computeAccessTokenStatus", - "response": { - "$ref": "ComputeRepositoryAccessTokenStatusResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "create": { "description": "Creates a new Repository in a given project and location.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories", @@ -299,42 +241,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "fetchHistory": { - "description": "Fetches a Repository's history of commits. The Repository must not have a value for `git_remote_settings.url`.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:fetchHistory", - "httpMethod": "GET", - "id": "dataform.projects.locations.repositories.fetchHistory", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The repository's name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "Optional. Maximum number of commits to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. Page token received from a previous `FetchRepositoryHistory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchRepositoryHistory` must match the call that provided the page token.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+name}:fetchHistory", - "response": { - "$ref": "FetchRepositoryHistoryResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "fetchRemoteBranches": { "description": "Fetches a Repository's remote branches.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:fetchRemoteBranches", @@ -496,87 +402,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "queryDirectoryContents": { - "description": "Returns the contents of a given Repository directory. The Repository must not have a value for `git_remote_settings.url`.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:queryDirectoryContents", - "httpMethod": "GET", - "id": "dataform.projects.locations.repositories.queryDirectoryContents", - "parameterOrder": [ - "name" - ], - "parameters": { - "commitSha": { - "description": "Optional. The Commit SHA for the commit to query from. If unset, the directory will be queried from HEAD.", - "location": "query", - "type": "string" - }, - "name": { - "description": "Required. The repository's name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "Optional. Maximum number of paths to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. Page token received from a previous `QueryRepositoryDirectoryContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `QueryRepositoryDirectoryContents` must match the call that provided the page token.", - "location": "query", - "type": "string" - }, - "path": { - "description": "Optional. The directory's full path including directory name, relative to root. If left unset, the root is used.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+name}:queryDirectoryContents", - "response": { - "$ref": "QueryRepositoryDirectoryContentsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "readFile": { - "description": "Returns the contents of a file (inside a Repository). The Repository must not have a value for `git_remote_settings.url`.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:readFile", - "httpMethod": "GET", - "id": "dataform.projects.locations.repositories.readFile", - "parameterOrder": [ - "name" - ], - "parameters": { - "commitSha": { - "description": "Optional. The commit SHA for the commit to read from. If unset, the file will be read from HEAD.", - "location": "query", - "type": "string" - }, - "name": { - "description": "Required. The repository's name.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - "required": true, - "type": "string" - }, - "path": { - "description": "Required. Full file path to read including filename, from repository root.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+name}:readFile", - "response": { - "$ref": "ReadRepositoryFileResponse" - }, - "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}/repositories/{repositoriesId}:setIamPolicy", @@ -1966,7 +1791,7 @@ } } }, - "revision": "20230318", + "revision": "20230408", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "Assertion": { @@ -2128,63 +1953,6 @@ }, "type": "object" }, - "CommitLogEntry": { - "description": "Represents a single commit log.", - "id": "CommitLogEntry", - "properties": { - "author": { - "$ref": "CommitAuthor", - "description": "The commit author for this commit log entry." - }, - "commitMessage": { - "description": "The commit message for this commit log entry.", - "type": "string" - }, - "commitSha": { - "description": "The commit SHA for this commit log entry.", - "type": "string" - }, - "commitTime": { - "description": "Commit timestamp.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "CommitMetadata": { - "description": "Represents a Dataform Git commit.", - "id": "CommitMetadata", - "properties": { - "author": { - "$ref": "CommitAuthor", - "description": "Required. The commit's author." - }, - "commitMessage": { - "description": "Optional. The commit's message.", - "type": "string" - } - }, - "type": "object" - }, - "CommitRepositoryChangesRequest": { - "description": "`CommitRepositoryChanges` request message.", - "id": "CommitRepositoryChangesRequest", - "properties": { - "commitMetadata": { - "$ref": "CommitMetadata", - "description": "Required. The changes to commit to the repository." - }, - "fileOperations": { - "additionalProperties": { - "$ref": "FileOperation" - }, - "description": "A map to the path of the file to the operation. The path is the ull file path including filename, from repository root.", - "type": "object" - } - }, - "type": "object" - }, "CommitWorkspaceChangesRequest": { "description": "`CommitWorkspaceChanges` request message.", "id": "CommitWorkspaceChangesRequest", @@ -2315,29 +2083,6 @@ }, "type": "object" }, - "ComputeRepositoryAccessTokenStatusResponse": { - "description": "`ComputeRepositoryAccessTokenStatus` response message.", - "id": "ComputeRepositoryAccessTokenStatusResponse", - "properties": { - "tokenStatus": { - "description": "Indicates the status of the Git access token.", - "enum": [ - "TOKEN_STATUS_UNSPECIFIED", - "NOT_FOUND", - "INVALID", - "VALID" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "The token could not be found in Secret Manager (or the Dataform Service Account did not have permission to access it).", - "The token could not be used to authenticate against the Git remote.", - "The token was used successfully to authenticate against the Git remote." - ], - "type": "string" - } - }, - "type": "object" - }, "Declaration": { "description": "Represents a relation which is not managed by Dataform but which may be referenced by Dataform actions.", "id": "Declaration", @@ -2349,12 +2094,6 @@ }, "type": "object" }, - "DeleteFile": { - "description": "Represents the delete file operation.", - "id": "DeleteFile", - "properties": {}, - "type": "object" - }, "DirectoryEntry": { "description": "Represents a single entry in a directory.", "id": "DirectoryEntry", @@ -2455,39 +2194,6 @@ }, "type": "object" }, - "FetchRepositoryHistoryResponse": { - "description": "`FetchRepositoryHistory` response message.", - "id": "FetchRepositoryHistoryResponse", - "properties": { - "commits": { - "description": "A list of commit logs, ordered by 'git log' default order.", - "items": { - "$ref": "CommitLogEntry" - }, - "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" - } - }, - "type": "object" - }, - "FileOperation": { - "description": "Represents a single file operation to the repository.", - "id": "FileOperation", - "properties": { - "deleteFile": { - "$ref": "DeleteFile", - "description": "Represents the delete operation." - }, - "writeFile": { - "$ref": "WriteFile", - "description": "Represents the write operation." - } - }, - "type": "object" - }, "GitRemoteSettings": { "description": "Controls Git remote configuration for a repository.", "id": "GitRemoteSettings", @@ -3057,24 +2763,6 @@ }, "type": "object" }, - "QueryRepositoryDirectoryContentsResponse": { - "description": "`QueryRepositoryDirectoryContents` response message.", - "id": "QueryRepositoryDirectoryContentsResponse", - "properties": { - "directoryEntries": { - "description": "List of entries in the directory.", - "items": { - "$ref": "DirectoryEntry" - }, - "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" - } - }, - "type": "object" - }, "QueryWorkflowInvocationActionsResponse": { "description": "`QueryWorkflowInvocationActions` response message.", "id": "QueryWorkflowInvocationActionsResponse", @@ -3105,18 +2793,6 @@ }, "type": "object" }, - "ReadRepositoryFileResponse": { - "description": "`ReadRepositoryFile` response message.", - "id": "ReadRepositoryFileResponse", - "properties": { - "contents": { - "description": "The file's contents.", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, "Relation": { "description": "Represents a database relation.", "id": "Relation", @@ -3260,7 +2936,7 @@ "type": "string" }, "recentScheduledReleaseRecords": { - "description": "Output only. Records of the 10 most recent scheduled release attempts. Updated whenever automatic creation of a compilation result is triggered by cron_schedule.", + "description": "Output only. Records of the 10 most recent scheduled release attempts, ordered in in descending order of `release_time`. Updated whenever automatic creation of a compilation result is triggered by cron_schedule.", "items": { "$ref": "ScheduledReleaseRecord" }, @@ -3308,25 +2984,6 @@ "$ref": "GitRemoteSettings", "description": "Optional. If set, configures this repository to be linked to a Git remote." }, - "initialCommitFileContents": { - "additionalProperties": { - "format": "byte", - "type": "string" - }, - "description": "Optional. Input only. The initial commit file contents. Represented as map from file path to contents. The path is the full file path to commit including filename, from repository root.", - "type": "object" - }, - "initialCommitMetadata": { - "$ref": "CommitMetadata", - "description": "Optional. Input only. An optional initial commit metadata for the Repository. The Repository must not have a value for `git_remote_settings.url`." - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Repository user labels.", - "type": "object" - }, "name": { "description": "Output only. The repository's name.", "readOnly": true, @@ -3533,7 +3190,7 @@ "type": "string" }, "recentScheduledExecutionRecords": { - "description": "Output only. Records of the 10 most recent scheduled execution attempts. Updated whenever automatic creation of a compilation result is triggered by cron_schedule.", + "description": "Output only. Records of the 10 most recent scheduled execution attempts, ordered in in descending order of `execution_time`. Updated whenever automatic creation of a workflow invocation is triggered by cron_schedule.", "items": { "$ref": "ScheduledExecutionRecord" }, @@ -3687,18 +3344,6 @@ }, "type": "object" }, - "WriteFile": { - "description": "Represents the write file operation (for files added or modified).", - "id": "WriteFile", - "properties": { - "contents": { - "description": "The file's contents.", - "format": "byte", - "type": "string" - } - }, - "type": "object" - }, "WriteFileRequest": { "description": "`WriteFile` request message.", "id": "WriteFileRequest", diff --git a/dataform/v1beta1/dataform-gen.go b/dataform/v1beta1/dataform-gen.go index bdf0793ef7b..9a8e6c80ab6 100644 --- a/dataform/v1beta1/dataform-gen.go +++ b/dataform/v1beta1/dataform-gen.go @@ -519,108 +519,6 @@ func (s *CommitAuthor) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CommitLogEntry: Represents a single commit log. -type CommitLogEntry struct { - // Author: The commit author for this commit log entry. - Author *CommitAuthor `json:"author,omitempty"` - - // CommitMessage: The commit message for this commit log entry. - CommitMessage string `json:"commitMessage,omitempty"` - - // CommitSha: The commit SHA for this commit log entry. - CommitSha string `json:"commitSha,omitempty"` - - // CommitTime: Commit timestamp. - CommitTime string `json:"commitTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Author") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Author") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitLogEntry) MarshalJSON() ([]byte, error) { - type NoMethod CommitLogEntry - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CommitMetadata: Represents a Dataform Git commit. -type CommitMetadata struct { - // Author: Required. The commit's author. - Author *CommitAuthor `json:"author,omitempty"` - - // CommitMessage: Optional. The commit's message. - CommitMessage string `json:"commitMessage,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Author") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Author") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *CommitMetadata) MarshalJSON() ([]byte, error) { - type NoMethod CommitMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// CommitRepositoryChangesRequest: `CommitRepositoryChanges` request -// message. -type CommitRepositoryChangesRequest struct { - // CommitMetadata: Required. The changes to commit to the repository. - CommitMetadata *CommitMetadata `json:"commitMetadata,omitempty"` - - // FileOperations: A map to the path of the file to the operation. The - // path is the ull file path including filename, from repository root. - FileOperations map[string]FileOperation `json:"fileOperations,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CommitMetadata") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CommitMetadata") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *CommitRepositoryChangesRequest) MarshalJSON() ([]byte, error) { - type NoMethod CommitRepositoryChangesRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // CommitWorkspaceChangesRequest: `CommitWorkspaceChanges` request // message. type CommitWorkspaceChangesRequest struct { @@ -817,48 +715,6 @@ func (s *CompilationResultAction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ComputeRepositoryAccessTokenStatusResponse: -// `ComputeRepositoryAccessTokenStatus` response message. -type ComputeRepositoryAccessTokenStatusResponse struct { - // TokenStatus: Indicates the status of the Git access token. - // - // Possible values: - // "TOKEN_STATUS_UNSPECIFIED" - Default value. This value is unused. - // "NOT_FOUND" - The token could not be found in Secret Manager (or - // the Dataform Service Account did not have permission to access it). - // "INVALID" - The token could not be used to authenticate against the - // Git remote. - // "VALID" - The token was used successfully to authenticate against - // the Git remote. - TokenStatus string `json:"tokenStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "TokenStatus") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TokenStatus") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ComputeRepositoryAccessTokenStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod ComputeRepositoryAccessTokenStatusResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Declaration: Represents a relation which is not managed by Dataform // but which may be referenced by Dataform actions. type Declaration struct { @@ -891,10 +747,6 @@ func (s *Declaration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DeleteFile: Represents the delete file operation. -type DeleteFile struct { -} - // DirectoryEntry: Represents a single entry in a directory. type DirectoryEntry struct { // Directory: A child directory in the directory. @@ -1134,75 +986,6 @@ func (s *FetchRemoteBranchesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// FetchRepositoryHistoryResponse: `FetchRepositoryHistory` response -// message. -type FetchRepositoryHistoryResponse struct { - // Commits: A list of commit logs, ordered by 'git log' default order. - Commits []*CommitLogEntry `json:"commits,omitempty"` - - // NextPageToken: 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 `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Commits") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Commits") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FetchRepositoryHistoryResponse) MarshalJSON() ([]byte, error) { - type NoMethod FetchRepositoryHistoryResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// FileOperation: Represents a single file operation to the repository. -type FileOperation struct { - // DeleteFile: Represents the delete operation. - DeleteFile *DeleteFile `json:"deleteFile,omitempty"` - - // WriteFile: Represents the write operation. - WriteFile *WriteFile `json:"writeFile,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DeleteFile") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DeleteFile") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *FileOperation) MarshalJSON() ([]byte, error) { - type NoMethod FileOperation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GitRemoteSettings: Controls Git remote configuration for a // repository. type GitRemoteSettings struct { @@ -2200,45 +1983,6 @@ func (s *QueryDirectoryContentsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// QueryRepositoryDirectoryContentsResponse: -// `QueryRepositoryDirectoryContents` response message. -type QueryRepositoryDirectoryContentsResponse struct { - // DirectoryEntries: List of entries in the directory. - DirectoryEntries []*DirectoryEntry `json:"directoryEntries,omitempty"` - - // NextPageToken: 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 `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "DirectoryEntries") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DirectoryEntries") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *QueryRepositoryDirectoryContentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod QueryRepositoryDirectoryContentsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // QueryWorkflowInvocationActionsResponse: // `QueryWorkflowInvocationActions` response message. type QueryWorkflowInvocationActionsResponse struct { @@ -2309,38 +2053,6 @@ func (s *ReadFileResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReadRepositoryFileResponse: `ReadRepositoryFile` response message. -type ReadRepositoryFileResponse struct { - // Contents: The file's contents. - Contents string `json:"contents,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Contents") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ReadRepositoryFileResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReadRepositoryFileResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Relation: Represents a database relation. type Relation struct { // AdditionalOptions: Additional options that will be provided as @@ -2484,8 +2196,9 @@ type ReleaseConfig struct { Name string `json:"name,omitempty"` // RecentScheduledReleaseRecords: Output only. Records of the 10 most - // recent scheduled release attempts. Updated whenever automatic - // creation of a compilation result is triggered by cron_schedule. + // recent scheduled release attempts, ordered in in descending order of + // `release_time`. Updated whenever automatic creation of a compilation + // result is triggered by cron_schedule. RecentScheduledReleaseRecords []*ScheduledReleaseRecord `json:"recentScheduledReleaseRecords,omitempty"` // ReleaseCompilationResult: Optional. The name of the currently @@ -2597,20 +2310,6 @@ type Repository struct { // linked to a Git remote. GitRemoteSettings *GitRemoteSettings `json:"gitRemoteSettings,omitempty"` - // InitialCommitFileContents: Optional. Input only. The initial commit - // file contents. Represented as map from file path to contents. The - // path is the full file path to commit including filename, from - // repository root. - InitialCommitFileContents map[string]string `json:"initialCommitFileContents,omitempty"` - - // InitialCommitMetadata: Optional. Input only. An optional initial - // commit metadata for the Repository. The Repository must not have a - // value for `git_remote_settings.url`. - InitialCommitMetadata *CommitMetadata `json:"initialCommitMetadata,omitempty"` - - // Labels: Optional. Repository user labels. - Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. The repository's name. Name string `json:"name,omitempty"` @@ -2997,8 +2696,9 @@ type WorkflowConfig struct { Name string `json:"name,omitempty"` // RecentScheduledExecutionRecords: Output only. Records of the 10 most - // recent scheduled execution attempts. Updated whenever automatic - // creation of a compilation result is triggered by cron_schedule. + // recent scheduled execution attempts, ordered in in descending order + // of `execution_time`. Updated whenever automatic creation of a + // workflow invocation is triggered by cron_schedule. RecentScheduledExecutionRecords []*ScheduledExecutionRecord `json:"recentScheduledExecutionRecords,omitempty"` // ReleaseConfig: Required. The name of the release config whose @@ -3248,35 +2948,6 @@ func (s *WorkspaceCompilationOverrides) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// WriteFile: Represents the write file operation (for files added or -// modified). -type WriteFile struct { - // Contents: The file's contents. - Contents string `json:"contents,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Contents") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *WriteFile) MarshalJSON() ([]byte, error) { - type NoMethod WriteFile - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // WriteFileRequest: `WriteFile` request message. type WriteFileRequest struct { // Contents: Required. The file's contents. @@ -3492,14 +3163,6 @@ func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsList return c } -// IncludeUnrevealedLocations sets the optional parameter -// "includeUnrevealedLocations": If true, the returned list will include -// locations which are not yet revealed. -func (c *ProjectsLocationsListCall) IncludeUnrevealedLocations(includeUnrevealedLocations bool) *ProjectsLocationsListCall { - c.urlParams_.Set("includeUnrevealedLocations", fmt.Sprint(includeUnrevealedLocations)) - return c -} - // PageSize sets the optional parameter "pageSize": The maximum number // of results to return. If not set, the service selects a default. func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { @@ -3627,11 +3290,6 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat // "location": "query", // "type": "string" // }, - // "includeUnrevealedLocations": { - // "description": "If true, the returned list will include locations which are not yet revealed.", - // "location": "query", - // "type": "boolean" - // }, // "name": { // "description": "The resource that owns the locations collection, if applicable.", // "location": "path", @@ -3683,298 +3341,6 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } -// method id "dataform.projects.locations.repositories.commit": - -type ProjectsLocationsRepositoriesCommitCall struct { - s *Service - name string - commitrepositorychangesrequest *CommitRepositoryChangesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Commit: Applies a Git commit to a Repository. The Repository must not -// have a value for `git_remote_settings.url`. -// -// - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) Commit(name string, commitrepositorychangesrequest *CommitRepositoryChangesRequest) *ProjectsLocationsRepositoriesCommitCall { - c := &ProjectsLocationsRepositoriesCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.commitrepositorychangesrequest = commitrepositorychangesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsRepositoriesCommitCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCommitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRepositoriesCommitCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCommitCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRepositoriesCommitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesCommitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrepositorychangesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:commit") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataform.projects.locations.repositories.commit" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsRepositoriesCommitCall) Do(opts ...googleapi.CallOption) (*Empty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Empty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Applies a Git commit to a Repository. The Repository must not have a value for `git_remote_settings.url`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:commit", - // "httpMethod": "POST", - // "id": "dataform.projects.locations.repositories.commit", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The repository's name.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:commit", - // "request": { - // "$ref": "CommitRepositoryChangesRequest" - // }, - // "response": { - // "$ref": "Empty" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dataform.projects.locations.repositories.computeAccessTokenStatus": - -type ProjectsLocationsRepositoriesComputeAccessTokenStatusCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ComputeAccessTokenStatus: Computes a Repository's Git access token -// status. -// -// - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) ComputeAccessTokenStatus(name string) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { - c := &ProjectsLocationsRepositoriesComputeAccessTokenStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:computeAccessTokenStatus") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataform.projects.locations.repositories.computeAccessTokenStatus" call. -// Exactly one of *ComputeRepositoryAccessTokenStatusResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *ComputeRepositoryAccessTokenStatusResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Do(opts ...googleapi.CallOption) (*ComputeRepositoryAccessTokenStatusResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ComputeRepositoryAccessTokenStatusResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Computes a Repository's Git access token status.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:computeAccessTokenStatus", - // "httpMethod": "GET", - // "id": "dataform.projects.locations.repositories.computeAccessTokenStatus", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The repository's name.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:computeAccessTokenStatus", - // "response": { - // "$ref": "ComputeRepositoryAccessTokenStatusResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "dataform.projects.locations.repositories.create": type ProjectsLocationsRepositoriesCreateCall struct { @@ -4276,9 +3642,9 @@ func (c *ProjectsLocationsRepositoriesDeleteCall) Do(opts ...googleapi.CallOptio } -// method id "dataform.projects.locations.repositories.fetchHistory": +// method id "dataform.projects.locations.repositories.fetchRemoteBranches": -type ProjectsLocationsRepositoriesFetchHistoryCall struct { +type ProjectsLocationsRepositoriesFetchRemoteBranchesCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4287,217 +3653,20 @@ type ProjectsLocationsRepositoriesFetchHistoryCall struct { header_ http.Header } -// FetchHistory: Fetches a Repository's history of commits. The -// Repository must not have a value for `git_remote_settings.url`. +// FetchRemoteBranches: Fetches a Repository's remote branches. // // - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) FetchHistory(name string) *ProjectsLocationsRepositoriesFetchHistoryCall { - c := &ProjectsLocationsRepositoriesFetchHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsRepositoriesService) FetchRemoteBranches(name string) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { + c := &ProjectsLocationsRepositoriesFetchRemoteBranchesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// commits to return. The server may return fewer items than requested. -// If unspecified, the server will pick an appropriate default. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesFetchHistoryCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token -// received from a previous `FetchRepositoryHistory` call. Provide this -// to retrieve the subsequent page. When paginating, all other -// parameters provided to `FetchRepositoryHistory` must match the call -// that provided the page token. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesFetchHistoryCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFetchHistoryCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFetchHistoryCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFetchHistoryCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:fetchHistory") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataform.projects.locations.repositories.fetchHistory" call. -// Exactly one of *FetchRepositoryHistoryResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *FetchRepositoryHistoryResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Do(opts ...googleapi.CallOption) (*FetchRepositoryHistoryResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &FetchRepositoryHistoryResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Fetches a Repository's history of commits. The Repository must not have a value for `git_remote_settings.url`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:fetchHistory", - // "httpMethod": "GET", - // "id": "dataform.projects.locations.repositories.fetchHistory", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The repository's name.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Maximum number of commits to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Page token received from a previous `FetchRepositoryHistory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchRepositoryHistory` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:fetchHistory", - // "response": { - // "$ref": "FetchRepositoryHistoryResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Pages(ctx context.Context, f func(*FetchRepositoryHistoryResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "dataform.projects.locations.repositories.fetchRemoteBranches": - -type ProjectsLocationsRepositoriesFetchRemoteBranchesCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// FetchRemoteBranches: Fetches a Repository's remote branches. -// -// - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) FetchRemoteBranches(name string) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { - c := &ProjectsLocationsRepositoriesFetchRemoteBranchesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5320,403 +4489,6 @@ func (c *ProjectsLocationsRepositoriesPatchCall) Do(opts ...googleapi.CallOption } -// method id "dataform.projects.locations.repositories.queryDirectoryContents": - -type ProjectsLocationsRepositoriesQueryDirectoryContentsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// QueryDirectoryContents: Returns the contents of a given Repository -// directory. The Repository must not have a value for -// `git_remote_settings.url`. -// -// - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) QueryDirectoryContents(name string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c := &ProjectsLocationsRepositoriesQueryDirectoryContentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// CommitSha sets the optional parameter "commitSha": The Commit SHA for -// the commit to query from. If unset, the directory will be queried -// from HEAD. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) CommitSha(commitSha string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.urlParams_.Set("commitSha", commitSha) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// paths to return. The server may return fewer items than requested. If -// unspecified, the server will pick an appropriate default. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token -// received from a previous `QueryRepositoryDirectoryContents` call. -// Provide this to retrieve the subsequent page. When paginating, all -// other parameters provided to `QueryRepositoryDirectoryContents` must -// match the call that provided the page token. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Path sets the optional parameter "path": The directory's full path -// including directory name, relative to root. If left unset, the root -// is used. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Path(path string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.urlParams_.Set("path", path) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:queryDirectoryContents") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataform.projects.locations.repositories.queryDirectoryContents" call. -// Exactly one of *QueryRepositoryDirectoryContentsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *QueryRepositoryDirectoryContentsResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Do(opts ...googleapi.CallOption) (*QueryRepositoryDirectoryContentsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &QueryRepositoryDirectoryContentsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the contents of a given Repository directory. The Repository must not have a value for `git_remote_settings.url`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:queryDirectoryContents", - // "httpMethod": "GET", - // "id": "dataform.projects.locations.repositories.queryDirectoryContents", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "commitSha": { - // "description": "Optional. The Commit SHA for the commit to query from. If unset, the directory will be queried from HEAD.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "Required. The repository's name.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Maximum number of paths to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Page token received from a previous `QueryRepositoryDirectoryContents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `QueryRepositoryDirectoryContents` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "path": { - // "description": "Optional. The directory's full path including directory name, relative to root. If left unset, the root is used.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:queryDirectoryContents", - // "response": { - // "$ref": "QueryRepositoryDirectoryContentsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Pages(ctx context.Context, f func(*QueryRepositoryDirectoryContentsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "dataform.projects.locations.repositories.readFile": - -type ProjectsLocationsRepositoriesReadFileCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ReadFile: Returns the contents of a file (inside a Repository). The -// Repository must not have a value for `git_remote_settings.url`. -// -// - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) ReadFile(name string) *ProjectsLocationsRepositoriesReadFileCall { - c := &ProjectsLocationsRepositoriesReadFileCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// CommitSha sets the optional parameter "commitSha": The commit SHA for -// the commit to read from. If unset, the file will be read from HEAD. -func (c *ProjectsLocationsRepositoriesReadFileCall) CommitSha(commitSha string) *ProjectsLocationsRepositoriesReadFileCall { - c.urlParams_.Set("commitSha", commitSha) - return c -} - -// Path sets the optional parameter "path": Required. Full file path to -// read including filename, from repository root. -func (c *ProjectsLocationsRepositoriesReadFileCall) Path(path string) *ProjectsLocationsRepositoriesReadFileCall { - c.urlParams_.Set("path", path) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsRepositoriesReadFileCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesReadFileCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsRepositoriesReadFileCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesReadFileCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsRepositoriesReadFileCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesReadFileCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsRepositoriesReadFileCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesReadFileCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:readFile") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataform.projects.locations.repositories.readFile" call. -// Exactly one of *ReadRepositoryFileResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ReadRepositoryFileResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesReadFileCall) Do(opts ...googleapi.CallOption) (*ReadRepositoryFileResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ReadRepositoryFileResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns the contents of a file (inside a Repository). The Repository must not have a value for `git_remote_settings.url`.", - // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}:readFile", - // "httpMethod": "GET", - // "id": "dataform.projects.locations.repositories.readFile", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "commitSha": { - // "description": "Optional. The commit SHA for the commit to read from. If unset, the file will be read from HEAD.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "Required. The repository's name.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/repositories/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "path": { - // "description": "Required. Full file path to read including filename, from repository root.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1beta1/{+name}:readFile", - // "response": { - // "$ref": "ReadRepositoryFileResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "dataform.projects.locations.repositories.setIamPolicy": type ProjectsLocationsRepositoriesSetIamPolicyCall struct { diff --git a/datamigration/v1beta1/datamigration-api.json b/datamigration/v1beta1/datamigration-api.json index e26d17dba22..f3e46aa5e17 100644 --- a/datamigration/v1beta1/datamigration-api.json +++ b/datamigration/v1beta1/datamigration-api.json @@ -1049,7 +1049,7 @@ } } }, - "revision": "20230308", + "revision": "20230405", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AuditConfig": { @@ -1767,7 +1767,10 @@ "UNSUPPORTED_GTID_MODE", "UNSUPPORTED_DEFINER", "CANT_RESTART_RUNNING_MIGRATION", - "TABLES_WITH_LIMITED_SUPPORT" + "TABLES_WITH_LIMITED_SUPPORT", + "UNSUPPORTED_DATABASE_LOCALE", + "UNSUPPORTED_DATABASE_FDW_CONFIG", + "ERROR_RDBMS" ], "enumDescriptions": [ "An unknown error occurred", @@ -1779,7 +1782,10 @@ "The gtid_mode is not supported, applicable for MySQL.", "The definer is not supported.", "Migration is already running at the time of restart request.", - "The source has tables with limited support. E.g. PostgreSQL tables without primary keys." + "The source has tables with limited support. E.g. PostgreSQL tables without primary keys.", + "The source uses an unsupported locale.", + "The source uses an unsupported Foreign Data Wrapper configuration.", + "There was an underlying RDBMS error." ], "readOnly": true, "type": "string" diff --git a/datamigration/v1beta1/datamigration-gen.go b/datamigration/v1beta1/datamigration-gen.go index 176c1270d79..3474d386b7a 100644 --- a/datamigration/v1beta1/datamigration-gen.go +++ b/datamigration/v1beta1/datamigration-gen.go @@ -1188,6 +1188,11 @@ type MigrationJobVerificationError struct { // the time of restart request. // "TABLES_WITH_LIMITED_SUPPORT" - The source has tables with limited // support. E.g. PostgreSQL tables without primary keys. + // "UNSUPPORTED_DATABASE_LOCALE" - The source uses an unsupported + // locale. + // "UNSUPPORTED_DATABASE_FDW_CONFIG" - The source uses an unsupported + // Foreign Data Wrapper configuration. + // "ERROR_RDBMS" - There was an underlying RDBMS error. ErrorCode string `json:"errorCode,omitempty"` // ErrorDetailMessage: Output only. A specific detailed error message, diff --git a/displayvideo/v1/displayvideo-api.json b/displayvideo/v1/displayvideo-api.json index ae212b9ceac..fbedc7633a3 100644 --- a/displayvideo/v1/displayvideo-api.json +++ b/displayvideo/v1/displayvideo-api.json @@ -8146,7 +8146,7 @@ } } }, - "revision": "20230316", + "revision": "20230406", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -8641,7 +8641,7 @@ "type": "string" }, "mediaId": { - "description": "Media ID of the uploaded asset. This is a unique identifier for the asset. This ID can be passed to other API calls, e.g. CreateCreative to associate the asset with a creative. **On April 5, 2023, the value of this ID will be updated. Before this date, we recommend that you stop using any cached media IDs when creating or updating creatives, and instead upload assets immediately before using them for creative production.** **After April 5, you can update cached media IDs to the new values by retrieving them from associated creative resources or re-uploading them.**", + "description": "Media ID of the uploaded asset. This is a unique identifier for the asset. This ID can be passed to other API calls, e.g. CreateCreative to associate the asset with a creative. The Media ID space updated on **April 5, 2023**. Update media IDs cached before **April 5, 2023** by retrieving the new media ID from associated creative resources or re-uploading the asset.", "format": "int64", "type": "string" } @@ -8682,18 +8682,18 @@ "The asset is the main asset of the creative.", "The asset is a backup asset of the creative.", "The asset is a polite load asset of the creative.", - "Headline of a native creative. The content must be UTF-8 encoded with a length of no more than 25 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", - "Long headline of a native creative. The content must be UTF-8 encoded with a length of no more than 50 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", - "Body text of a native creative. The content must be UTF-8 encoded with a length of no more than 90 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", - "Long body text of a native creative. The content must be UTF-8 encoded with a length of no more than 150 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", - "A short, friendly version of the landing page URL to show in the creative. This URL gives people an idea of where they'll arrive after they click on the creative. The content must be UTF-8 encoded with a length of no more than 30 characters. For example, if the landing page URL is 'http://www.example.com/page', the caption URL can be 'example.com'. The protocol (http://) is optional, but the URL can't contain spaces or special characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", - "The text to use on the call-to-action button of a native creative. The content must be UTF-8 encoded with a length of no more than 15 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", - "The text that identifies the advertiser or brand name. The content must be UTF-8 encoded with a length of no more than 25 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", - "The purchase price of your app in the Google play store or iOS app store (for example, $5.99). Note that this value is not automatically synced with the actual value listed in the store. It will always be the one provided when save the creative. The content must be UTF-8 encoded with a length of no more than 15 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE`", - "The ID of an Android app in the Google play store. You can find this ID in the App’s Google Play Store URL after ‘id’. For example, in https://play.google.com/store/apps/details?id=com.company.appname the identifier is com.company.appname. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE`", - "The ID of an iOS app in the Apple app store. This ID number can be found in the Apple App Store URL as the string of numbers directly after \"id\". For example, in https://apps.apple.com/us/app/gmail-email-by-google/id422689480 the ID is 422689480. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE`", - "The rating of an app in the Google play store or iOS app store. Note that this value is not automatically synced with the actual rating in the store. It will always be the one provided when save the creative. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE`", - "The icon of a creative. This role is only supported and required in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE`", + "Headline of a native creative. The content must be UTF-8 encoded with a length of no more than 25 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", + "Long headline of a native creative. The content must be UTF-8 encoded with a length of no more than 50 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", + "Body text of a native creative. The content must be UTF-8 encoded with a length of no more than 90 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", + "Long body text of a native creative. The content must be UTF-8 encoded with a length of no more than 150 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", + "A short, friendly version of the landing page URL to show in the creative. This URL gives people an idea of where they'll arrive after they click on the creative. The content must be UTF-8 encoded with a length of no more than 30 characters. For example, if the landing page URL is 'http://www.example.com/page', the caption URL can be 'example.com'. The protocol (http://) is optional, but the URL can't contain spaces or special characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", + "The text to use on the call-to-action button of a native creative. The content must be UTF-8 encoded with a length of no more than 15 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", + "The text that identifies the advertiser or brand name. The content must be UTF-8 encoded with a length of no more than 25 characters. This role is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", + "The purchase price of your app in the Google play store or iOS app store (for example, $5.99). Note that this value is not automatically synced with the actual value listed in the store. It will always be the one provided when save the creative. The content must be UTF-8 encoded with a length of no more than 15 characters. Assets of this role are read-only.", + "The ID of an Android app in the Google play store. You can find this ID in the App’s Google Play Store URL after ‘id’. For example, in https://play.google.com/store/apps/details?id=com.company.appname the identifier is com.company.appname. Assets of this role are read-only.", + "The ID of an iOS app in the Apple app store. This ID number can be found in the Apple App Store URL as the string of numbers directly after \"id\". For example, in https://apps.apple.com/us/app/gmail-email-by-google/id422689480 the ID is 422689480. Assets of this role are read-only.", + "The rating of an app in the Google play store or iOS app store. Note that this value is not automatically synced with the actual rating in the store. It will always be the one provided when save the creative. Assets of this role are read-only.", + "The icon of a creative. This role is only supported and required in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE`", "The cover image of a native video creative. This role is only supported and required in following creative_type: * `CREATIVE_TYPE_VIDEO`" ], "type": "string" @@ -10912,7 +10912,7 @@ "id": "Creative", "properties": { "additionalDimensions": { - "description": "Additional dimensions. Applicable when creative_type is one of: * `CREATIVE_TYPE_STANDARD` * `CREATIVE_TYPE_EXPANDABLE` * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_TEMPLATED_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_LIGHTBOX` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * `CREATIVE_TYPE_PUBLISHER_HOSTED` If this field is specified, width_pixels and height_pixels are both required and must be greater than or equal to 0.", + "description": "Additional dimensions. Applicable when creative_type is one of: * `CREATIVE_TYPE_STANDARD` * `CREATIVE_TYPE_EXPANDABLE` * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_LIGHTBOX` * `CREATIVE_TYPE_PUBLISHER_HOSTED` If this field is specified, width_pixels and height_pixels are both required and must be greater than or equal to 0.", "items": { "$ref": "Dimensions" }, @@ -10929,7 +10929,7 @@ "type": "string" }, "assets": { - "description": "Required. Assets associated to this creative. Assets can be associated to the creative in one of following roles: * `ASSET_ROLE_UNSPECIFIED` * `ASSET_ROLE_MAIN` * `ASSET_ROLE_BACKUP` * `ASSET_ROLE_POLITE_LOAD`", + "description": "Required. Assets associated to this creative.", "items": { "$ref": "AssetAssociation" }, @@ -10943,7 +10943,7 @@ }, "cmTrackingAd": { "$ref": "CmTrackingAd", - "description": "The Campaign Manager 360 tracking ad associated with the creative. Optional for the following creative_type when created by an advertiser that uses both Campaign Manager 360 and third-party ad serving: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` Output only for other cases." + "description": "The Campaign Manager 360 tracking ad associated with the creative. Optional for the following creative_type when created by an advertiser that uses both Campaign Manager 360 and third-party ad serving: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` Output only for other cases." }, "companionCreativeIds": { "description": "The IDs of companion creatives for a video creative. You can assign existing display creatives (with image or HTML5 assets) to serve surrounding the publisher's video player. Companions display around the video player while the video is playing and remain after the video has completed. Creatives contain additional dimensions can not be companion creatives. This field is only supported for following creative_type: * `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_VIDEO`", @@ -11021,8 +11021,8 @@ "Square native creative. Create and update methods are supported for this creative type if the hosting_source is `HOSTING_SOURCE_HOSTED`", "Interstitial creative including both display and video. Create and update methods are **not** supported for this creative type.", "Responsive and expandable Lightbox creative. Create and update methods are **not** supported for this creative type.", - "Native app install creative. Create and update methods are supported for this creative type if the hosting_source is `HOSTING_SOURCE_HOSTED`", - "Square native app install creative. Create and update methods are supported for this creative type if the hosting_source is `HOSTING_SOURCE_HOSTED`", + "Native app install creative. Create and update methods are **not** supported for this creative type.", + "Square native app install creative. Create and update methods are **not** supported for this creative type.", "Audio creative. Create and update methods are supported for this creative type if the hosting_source is `HOSTING_SOURCE_HOSTED`", "Publisher hosted creative. Create and update methods are **not** supported for this creative type.", "Native video creative. Create and update methods are supported for this creative type if the hosting_source is `HOSTING_SOURCE_HOSTED`", @@ -11032,7 +11032,7 @@ }, "dimensions": { "$ref": "Dimensions", - "description": "Required. Primary dimensions of the creative. Applicable to all creative types. The value of width_pixels and height_pixels defaults to `0` when creative_type is one of: * `CREATIVE_TYPE_VIDEO` * `CREATIVE_TYPE_TEMPLATED_APP_INSTALL_INTERSTITIAL` * `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_NATIVE_VIDEO` * `CREATIVE_TYPE_TEMPLATED_APP_INSTALL_VIDEO`" + "description": "Required. Primary dimensions of the creative. Applicable to all creative types. The value of width_pixels and height_pixels defaults to `0` when creative_type is one of: * `CREATIVE_TYPE_VIDEO` * `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_NATIVE_VIDEO`" }, "displayName": { "description": "Required. The display name of the creative. Must be UTF-8 encoded with a maximum size of 240 bytes.", @@ -11121,7 +11121,7 @@ "Hosting source is not specified or is unknown in this version.", "A creative synced from Campaign Manager 360. Create and update methods are **not** supported for this hosting type.", "A creative hosted by a third-party ad server (3PAS). Create and update methods are supported for this hosting type if the creative_type is one of the following: * `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_EXPANDABLE` * `CREATIVE_TYPE_STANDARD` * `CREATIVE_TYPE_VIDEO`", - "A creative created in DV360 and hosted by Campaign Manager 360. Create and update methods are supported for this hosting type if the creative_type is one of the following: * `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` * `CREATIVE_TYPE_STANDARD` * `CREATIVE_TYPE_VIDEO`", + "A creative created in DV360 and hosted by Campaign Manager 360. Create and update methods are supported for this hosting type if the creative_type is one of the following: * `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` * `CREATIVE_TYPE_STANDARD` * `CREATIVE_TYPE_VIDEO`", "A rich media creative created in Studio and hosted by Campaign Manager 360. Create and update methods are **not** supported for this hosting type." ], "type": "string" @@ -11140,7 +11140,7 @@ "type": "string" }, "jsTrackerUrl": { - "description": "JavaScript measurement URL from supported third-party verification providers (ComScore, DoubleVerify, IAS, Moat). HTML script tags are not supported. This field is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", + "description": "JavaScript measurement URL from supported third-party verification providers (ComScore, DoubleVerify, IAS, Moat). HTML script tags are not supported. This field is only writeable in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", "type": "string" }, "lineItemIds": { @@ -11229,7 +11229,7 @@ "type": "array" }, "trackerUrls": { - "description": "Tracking URLs for analytics providers or third-party ad technology vendors. The URLs must start with https (except on inventory that doesn't require SSL compliance). If using macros in your URL, use only macros supported by Display \u0026 Video 360. Standard URLs only, no IMG or SCRIPT tags. This field is only supported in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", + "description": "Tracking URLs for analytics providers or third-party ad technology vendors. The URLs must start with https (except on inventory that doesn't require SSL compliance). If using macros in your URL, use only macros supported by Display \u0026 Video 360. Standard URLs only, no IMG or SCRIPT tags. This field is only writeable in following creative_type: * `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO`", "items": { "type": "string" }, @@ -11298,8 +11298,8 @@ "Square native creative. Create and update methods are supported for this creative type if the hosting_source is `HOSTING_SOURCE_HOSTED`", "Interstitial creative including both display and video. Create and update methods are **not** supported for this creative type.", "Responsive and expandable Lightbox creative. Create and update methods are **not** supported for this creative type.", - "Native app install creative. Create and update methods are supported for this creative type if the hosting_source is `HOSTING_SOURCE_HOSTED`", - "Square native app install creative. Create and update methods are supported for this creative type if the hosting_source is `HOSTING_SOURCE_HOSTED`", + "Native app install creative. Create and update methods are **not** supported for this creative type.", + "Square native app install creative. Create and update methods are **not** supported for this creative type.", "Audio creative. Create and update methods are supported for this creative type if the hosting_source is `HOSTING_SOURCE_HOSTED`", "Publisher hosted creative. Create and update methods are **not** supported for this creative type.", "Native video creative. Create and update methods are supported for this creative type if the hosting_source is `HOSTING_SOURCE_HOSTED`", diff --git a/displayvideo/v1/displayvideo-gen.go b/displayvideo/v1/displayvideo-gen.go index e2b957c16d9..8fd5fa3830a 100644 --- a/displayvideo/v1/displayvideo-gen.go +++ b/displayvideo/v1/displayvideo-gen.go @@ -1412,13 +1412,10 @@ type Asset struct { // MediaId: Media ID of the uploaded asset. This is a unique identifier // for the asset. This ID can be passed to other API calls, e.g. - // CreateCreative to associate the asset with a creative. **On April 5, - // 2023, the value of this ID will be updated. Before this date, we - // recommend that you stop using any cached media IDs when creating or - // updating creatives, and instead upload assets immediately before - // using them for creative production.** **After April 5, you can update - // cached media IDs to the new values by retrieving them from associated - // creative resources or re-uploading them.** + // CreateCreative to associate the asset with a creative. The Media ID + // space updated on **April 5, 2023**. Update media IDs cached before + // **April 5, 2023** by retrieving the new media ID from associated + // creative resources or re-uploading the asset. MediaId int64 `json:"mediaId,omitempty,string"` // ForceSendFields is a list of field names (e.g. "Content") to @@ -1462,29 +1459,21 @@ type AssetAssociation struct { // must be UTF-8 encoded with a length of no more than 25 characters. // This role is only supported in following creative_type: * // `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * // `CREATIVE_TYPE_NATIVE_VIDEO` // "ASSET_ROLE_LONG_HEADLINE" - Long headline of a native creative. // The content must be UTF-8 encoded with a length of no more than 50 // characters. This role is only supported in following creative_type: * // `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * // `CREATIVE_TYPE_NATIVE_VIDEO` // "ASSET_ROLE_BODY" - Body text of a native creative. The content // must be UTF-8 encoded with a length of no more than 90 characters. // This role is only supported in following creative_type: * // `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * // `CREATIVE_TYPE_NATIVE_VIDEO` // "ASSET_ROLE_LONG_BODY" - Long body text of a native creative. The // content must be UTF-8 encoded with a length of no more than 150 // characters. This role is only supported in following creative_type: * // `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * // `CREATIVE_TYPE_NATIVE_VIDEO` // "ASSET_ROLE_CAPTION_URL" - A short, friendly version of the landing // page URL to show in the creative. This URL gives people an idea of @@ -1495,59 +1484,40 @@ type AssetAssociation struct { // The protocol (http://) is optional, but the URL can't contain spaces // or special characters. This role is only supported in following // creative_type: * `CREATIVE_TYPE_NATIVE` * - // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * - // `CREATIVE_TYPE_NATIVE_VIDEO` + // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` // "ASSET_ROLE_CALL_TO_ACTION" - The text to use on the call-to-action // button of a native creative. The content must be UTF-8 encoded with a // length of no more than 15 characters. This role is only supported in // following creative_type: * `CREATIVE_TYPE_NATIVE` * - // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * - // `CREATIVE_TYPE_NATIVE_VIDEO` + // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` // "ASSET_ROLE_ADVERTISER_NAME" - The text that identifies the // advertiser or brand name. The content must be UTF-8 encoded with a // length of no more than 25 characters. This role is only supported in // following creative_type: * `CREATIVE_TYPE_NATIVE` * - // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * - // `CREATIVE_TYPE_NATIVE_VIDEO` + // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` // "ASSET_ROLE_PRICE" - The purchase price of your app in the Google // play store or iOS app store (for example, $5.99). Note that this // value is not automatically synced with the actual value listed in the // store. It will always be the one provided when save the creative. The // content must be UTF-8 encoded with a length of no more than 15 - // characters. This role is only supported in following creative_type: * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` + // characters. Assets of this role are read-only. // "ASSET_ROLE_ANDROID_APP_ID" - The ID of an Android app in the // Google play store. You can find this ID in the App’s Google Play // Store URL after ‘id’. For example, in // https://play.google.com/store/apps/details?id=com.company.appname the - // identifier is com.company.appname. This role is only supported in - // following creative_type: * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` + // identifier is com.company.appname. Assets of this role are read-only. // "ASSET_ROLE_IOS_APP_ID" - The ID of an iOS app in the Apple app // store. This ID number can be found in the Apple App Store URL as the // string of numbers directly after "id". For example, in // https://apps.apple.com/us/app/gmail-email-by-google/id422689480 the - // ID is 422689480. This role is only supported in following - // creative_type: * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` + // ID is 422689480. Assets of this role are read-only. // "ASSET_ROLE_RATING" - The rating of an app in the Google play store // or iOS app store. Note that this value is not automatically synced // with the actual rating in the store. It will always be the one - // provided when save the creative. This role is only supported in - // following creative_type: * `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` + // provided when save the creative. Assets of this role are read-only. // "ASSET_ROLE_ICON" - The icon of a creative. This role is only // supported and required in following creative_type: * - // `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` + // `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` // "ASSET_ROLE_COVER_IMAGE" - The cover image of a native video // creative. This role is only supported and required in following // creative_type: * `CREATIVE_TYPE_VIDEO` @@ -5246,10 +5216,7 @@ type Creative struct { // AdditionalDimensions: Additional dimensions. Applicable when // creative_type is one of: * `CREATIVE_TYPE_STANDARD` * // `CREATIVE_TYPE_EXPANDABLE` * `CREATIVE_TYPE_NATIVE` * - // `CREATIVE_TYPE_TEMPLATED_APP_INSTALL` * // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_LIGHTBOX` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * // `CREATIVE_TYPE_PUBLISHER_HOSTED` If this field is specified, // width_pixels and height_pixels are both required and must be greater // than or equal to 0. @@ -5263,10 +5230,7 @@ type Creative struct { // creative tag. AppendedTag string `json:"appendedTag,omitempty"` - // Assets: Required. Assets associated to this creative. Assets can be - // associated to the creative in one of following roles: * - // `ASSET_ROLE_UNSPECIFIED` * `ASSET_ROLE_MAIN` * `ASSET_ROLE_BACKUP` * - // `ASSET_ROLE_POLITE_LOAD` + // Assets: Required. Assets associated to this creative. Assets []*AssetAssociation `json:"assets,omitempty"` // CmPlacementId: Output only. The unique ID of the Campaign Manager 360 @@ -5278,10 +5242,7 @@ type Creative struct { // the creative. Optional for the following creative_type when created // by an advertiser that uses both Campaign Manager 360 and third-party // ad serving: * `CREATIVE_TYPE_NATIVE` * - // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` Output only for other - // cases. + // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` Output only for other cases. CmTrackingAd *CmTrackingAd `json:"cmTrackingAd,omitempty"` // CompanionCreativeIds: The IDs of companion creatives for a video @@ -5356,11 +5317,11 @@ type Creative struct { // creative. Create and update methods are **not** supported for this // creative type. // "CREATIVE_TYPE_NATIVE_APP_INSTALL" - Native app install creative. - // Create and update methods are supported for this creative type if the - // hosting_source is `HOSTING_SOURCE_HOSTED` + // Create and update methods are **not** supported for this creative + // type. // "CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE" - Square native app - // install creative. Create and update methods are supported for this - // creative type if the hosting_source is `HOSTING_SOURCE_HOSTED` + // install creative. Create and update methods are **not** supported for + // this creative type. // "CREATIVE_TYPE_AUDIO" - Audio creative. Create and update methods // are supported for this creative type if the hosting_source is // `HOSTING_SOURCE_HOSTED` @@ -5378,9 +5339,7 @@ type Creative struct { // Dimensions: Required. Primary dimensions of the creative. Applicable // to all creative types. The value of width_pixels and height_pixels // defaults to `0` when creative_type is one of: * `CREATIVE_TYPE_VIDEO` - // * `CREATIVE_TYPE_TEMPLATED_APP_INSTALL_INTERSTITIAL` * - // `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_NATIVE_VIDEO` * - // `CREATIVE_TYPE_TEMPLATED_APP_INSTALL_VIDEO` + // * `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_NATIVE_VIDEO` Dimensions *Dimensions `json:"dimensions,omitempty"` // DisplayName: Required. The display name of the creative. Must be @@ -5472,8 +5431,6 @@ type Creative struct { // Campaign Manager 360. Create and update methods are supported for // this hosting type if the creative_type is one of the following: * // `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_NATIVE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` * // `CREATIVE_TYPE_STANDARD` * `CREATIVE_TYPE_VIDEO` // "HOSTING_SOURCE_RICH_MEDIA" - A rich media creative created in @@ -5502,12 +5459,9 @@ type Creative struct { // JsTrackerUrl: JavaScript measurement URL from supported third-party // verification providers (ComScore, DoubleVerify, IAS, Moat). HTML - // script tags are not supported. This field is only supported in + // script tags are not supported. This field is only writeable in // following creative_type: * `CREATIVE_TYPE_NATIVE` * - // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * - // `CREATIVE_TYPE_NATIVE_VIDEO` + // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` JsTrackerUrl string `json:"jsTrackerUrl,omitempty"` // LineItemIds: Output only. The IDs of the line items this creative is @@ -5624,12 +5578,9 @@ type Creative struct { // technology vendors. The URLs must start with https (except on // inventory that doesn't require SSL compliance). If using macros in // your URL, use only macros supported by Display & Video 360. Standard - // URLs only, no IMG or SCRIPT tags. This field is only supported in + // URLs only, no IMG or SCRIPT tags. This field is only writeable in // following creative_type: * `CREATIVE_TYPE_NATIVE` * - // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL` * - // `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` * - // `CREATIVE_TYPE_NATIVE_VIDEO` + // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` TrackerUrls []string `json:"trackerUrls,omitempty"` // Transcodes: Output only. Audio/Video transcodes. Display & Video 360 @@ -5739,11 +5690,11 @@ type CreativeConfig struct { // creative. Create and update methods are **not** supported for this // creative type. // "CREATIVE_TYPE_NATIVE_APP_INSTALL" - Native app install creative. - // Create and update methods are supported for this creative type if the - // hosting_source is `HOSTING_SOURCE_HOSTED` + // Create and update methods are **not** supported for this creative + // type. // "CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE" - Square native app - // install creative. Create and update methods are supported for this - // creative type if the hosting_source is `HOSTING_SOURCE_HOSTED` + // install creative. Create and update methods are **not** supported for + // this creative type. // "CREATIVE_TYPE_AUDIO" - Audio creative. Create and update methods // are supported for this creative type if the hosting_source is // `HOSTING_SOURCE_HOSTED` diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 715b8aa45dc..d8e22f610f4 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -1423,7 +1423,7 @@ } } }, - "revision": "20230328", + "revision": "20230408", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -2032,6 +2032,20 @@ "readOnly": true, "type": "string" }, + "deleteProtectionState": { + "description": "State of delete protection for the database.", + "enum": [ + "DELETE_PROTECTION_STATE_UNSPECIFIED", + "DELETE_PROTECTION_DISABLED", + "DELETE_PROTECTION_ENABLED" + ], + "enumDescriptions": [ + "The default value. Delete protection type is not specified", + "Delete protection is disabled", + "Delete protection is enabled" + ], + "type": "string" + }, "etag": { "description": "This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", "type": "string" diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index 1f126d6bfc1..d48413b0e45 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -1384,6 +1384,15 @@ type GoogleFirestoreAdminV1Database struct { // created. CreateTime string `json:"createTime,omitempty"` + // DeleteProtectionState: State of delete protection for the database. + // + // Possible values: + // "DELETE_PROTECTION_STATE_UNSPECIFIED" - The default value. Delete + // protection type is not specified + // "DELETE_PROTECTION_DISABLED" - Delete protection is disabled + // "DELETE_PROTECTION_ENABLED" - Delete protection is enabled + DeleteProtectionState string `json:"deleteProtectionState,omitempty"` + // Etag: This checksum is computed by the server based on the value of // other fields, and may be sent on update and delete requests to ensure // the client has an up-to-date value before proceeding. diff --git a/iap/v1/iap-api.json b/iap/v1/iap-api.json index 68b9be1617f..e4124d50070 100644 --- a/iap/v1/iap-api.json +++ b/iap/v1/iap-api.json @@ -652,7 +652,7 @@ } } }, - "revision": "20230324", + "revision": "20230407", "rootUrl": "https://iap.googleapis.com/", "schemas": { "AccessDeniedPageSettings": { @@ -768,7 +768,7 @@ "RCTOKEN" ], "enumDescriptions": [ - "Output credential not provided. This is unsupported in IAP. An output credential is required.", + "An output credential is required.", "Propagate attributes in the headers with \"x-goog-iap-attr-\" prefix.", "Propagate attributes in the JWT of the form: `\"additional_claims\": { \"my_attribute\": [\"value1\", \"value2\"] }`", "Propagate attributes in the RCToken of the form: `\"additional_claims\": { \"my_attribute\": [\"value1\", \"value2\"] }`" @@ -1107,7 +1107,7 @@ "enumDescriptions": [ "Reauthentication disabled.", "Prompts the user to log in again.", - "Deprecated.", + "", "User must use their secure key 2nd factor device.", "User can use any enabled 2nd factor." ], diff --git a/iap/v1/iap-gen.go b/iap/v1/iap-gen.go index 07600c43e2e..0120d93879f 100644 --- a/iap/v1/iap-gen.go +++ b/iap/v1/iap-gen.go @@ -417,8 +417,8 @@ type AttributePropagationSettings struct { // fully duplicated in each selected output credential. // // Possible values: - // "OUTPUT_CREDENTIALS_UNSPECIFIED" - Output credential not provided. - // This is unsupported in IAP. An output credential is required. + // "OUTPUT_CREDENTIALS_UNSPECIFIED" - An output credential is + // required. // "HEADER" - Propagate attributes in the headers with // "x-goog-iap-attr-" prefix. // "JWT" - Propagate attributes in the JWT of the form: @@ -1250,7 +1250,7 @@ type ReauthSettings struct { // Possible values: // "METHOD_UNSPECIFIED" - Reauthentication disabled. // "LOGIN" - Prompts the user to log in again. - // "PASSWORD" - Deprecated. + // "PASSWORD" // "SECURE_KEY" - User must use their secure key 2nd factor device. // "ENROLLED_SECOND_FACTORS" - User can use any enabled 2nd factor. Method string `json:"method,omitempty"` diff --git a/identitytoolkit/v1/identitytoolkit-api.json b/identitytoolkit/v1/identitytoolkit-api.json index cc889b7a2b0..834051c8646 100644 --- a/identitytoolkit/v1/identitytoolkit-api.json +++ b/identitytoolkit/v1/identitytoolkit-api.json @@ -1237,7 +1237,7 @@ } } }, - "revision": "20230327", + "revision": "20230410", "rootUrl": "https://identitytoolkit.googleapis.com/", "schemas": { "GoogleCloudIdentitytoolkitV1Argon2Parameters": { @@ -1757,6 +1757,22 @@ "challenge": { "type": "string" }, + "clientType": { + "description": "The client type: web, Android or iOS. Required when reCAPTCHA Enterprise protection is enabled.", + "enum": [ + "CLIENT_TYPE_UNSPECIFIED", + "CLIENT_TYPE_WEB", + "CLIENT_TYPE_ANDROID", + "CLIENT_TYPE_IOS" + ], + "enumDescriptions": [ + "Client type is not specified.", + "Client type is web.", + "Client type is android.", + "Client type is ios." + ], + "type": "string" + }, "continueUrl": { "description": "The Url to continue after user clicks the link sent in email. This is the url that will allow the web widget to handle the OOB code.", "type": "string" @@ -1785,6 +1801,18 @@ "description": "The email address the account is being updated to. Required only for VERIFY_AND_CHANGE_EMAIL requests.", "type": "string" }, + "recaptchaVersion": { + "description": "The reCAPTCHA version of the reCAPTCHA token in the captcha_response.", + "enum": [ + "RECAPTCHA_VERSION_UNSPECIFIED", + "RECAPTCHA_ENTERPRISE" + ], + "enumDescriptions": [ + "The reCAPTCHA version is not specified.", + "The reCAPTCHA enterprise." + ], + "type": "string" + }, "requestType": { "description": "Required. The type of out-of-band (OOB) code to send. Depending on this value, other fields in this request will be required and/or have different meanings. There are 4 different OOB codes that can be sent: * PASSWORD_RESET * EMAIL_SIGNIN * VERIFY_EMAIL * VERIFY_AND_CHANGE_EMAIL", "enum": [ @@ -3054,6 +3082,22 @@ "description": "The reCAPTCHA token provided by the reCAPTCHA client-side integration. reCAPTCHA Enterprise uses it for risk assessment. Required when reCAPTCHA Enterprise is enabled.", "type": "string" }, + "clientType": { + "description": "The client type, web, android or ios. Required when reCAPTCHA Enterprise is enabled.", + "enum": [ + "CLIENT_TYPE_UNSPECIFIED", + "CLIENT_TYPE_WEB", + "CLIENT_TYPE_ANDROID", + "CLIENT_TYPE_IOS" + ], + "enumDescriptions": [ + "Client type is not specified.", + "Client type is web.", + "Client type is android.", + "Client type is ios." + ], + "type": "string" + }, "delegatedProjectNumber": { "format": "int64", "type": "string" @@ -3075,6 +3119,18 @@ "pendingIdToken": { "type": "string" }, + "recaptchaVersion": { + "description": "The reCAPTCHA version of the reCAPTCHA token in the captcha_response.", + "enum": [ + "RECAPTCHA_VERSION_UNSPECIFIED", + "RECAPTCHA_ENTERPRISE" + ], + "enumDescriptions": [ + "The reCAPTCHA version is not specified.", + "The reCAPTCHA enterprise." + ], + "type": "string" + }, "returnSecureToken": { "description": "Should always be true.", "type": "boolean" @@ -3265,6 +3321,22 @@ "description": "The reCAPTCHA token provided by the reCAPTCHA client-side integration. reCAPTCHA Enterprise uses it for assessment. Required when reCAPTCHA enterprise is enabled.", "type": "string" }, + "clientType": { + "description": "The client type: web, Android or iOS. Required when enabling reCAPTCHA enterprise protection.", + "enum": [ + "CLIENT_TYPE_UNSPECIFIED", + "CLIENT_TYPE_WEB", + "CLIENT_TYPE_ANDROID", + "CLIENT_TYPE_IOS" + ], + "enumDescriptions": [ + "Client type is not specified.", + "Client type is web.", + "Client type is android.", + "Client type is ios." + ], + "type": "string" + }, "disabled": { "description": "Whether the user will be disabled upon creation. Disabled accounts are inaccessible except for requests bearing a Google OAuth2 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control).", "type": "boolean" @@ -3311,6 +3383,18 @@ "description": "The profile photo url of the user to create.", "type": "string" }, + "recaptchaVersion": { + "description": "The reCAPTCHA version of the reCAPTCHA token in the captcha_response.", + "enum": [ + "RECAPTCHA_VERSION_UNSPECIFIED", + "RECAPTCHA_ENTERPRISE" + ], + "enumDescriptions": [ + "The reCAPTCHA version is not specified.", + "The reCAPTCHA enterprise." + ], + "type": "string" + }, "targetProjectId": { "description": "The project ID of the project which the user should belong to. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). If this is not set, the target project is inferred from the scope associated to the Bearer access token.", "type": "string" diff --git a/identitytoolkit/v1/identitytoolkit-gen.go b/identitytoolkit/v1/identitytoolkit-gen.go index d35037f049c..ca490dbcbf5 100644 --- a/identitytoolkit/v1/identitytoolkit-gen.go +++ b/identitytoolkit/v1/identitytoolkit-gen.go @@ -1062,6 +1062,16 @@ type GoogleCloudIdentitytoolkitV1GetOobCodeRequest struct { Challenge string `json:"challenge,omitempty"` + // ClientType: The client type: web, Android or iOS. Required when + // reCAPTCHA Enterprise protection is enabled. + // + // Possible values: + // "CLIENT_TYPE_UNSPECIFIED" - Client type is not specified. + // "CLIENT_TYPE_WEB" - Client type is web. + // "CLIENT_TYPE_ANDROID" - Client type is android. + // "CLIENT_TYPE_IOS" - Client type is ios. + ClientType string `json:"clientType,omitempty"` + // ContinueUrl: The Url to continue after user clicks the link sent in // email. This is the url that will allow the web widget to handle the // OOB code. @@ -1101,6 +1111,15 @@ type GoogleCloudIdentitytoolkitV1GetOobCodeRequest struct { // only for VERIFY_AND_CHANGE_EMAIL requests. NewEmail string `json:"newEmail,omitempty"` + // RecaptchaVersion: The reCAPTCHA version of the reCAPTCHA token in the + // captcha_response. + // + // Possible values: + // "RECAPTCHA_VERSION_UNSPECIFIED" - The reCAPTCHA version is not + // specified. + // "RECAPTCHA_ENTERPRISE" - The reCAPTCHA enterprise. + RecaptchaVersion string `json:"recaptchaVersion,omitempty"` + // RequestType: Required. The type of out-of-band (OOB) code to send. // Depending on this value, other fields in this request will be // required and/or have different meanings. There are 4 different OOB @@ -2933,6 +2952,16 @@ type GoogleCloudIdentitytoolkitV1SignInWithPasswordRequest struct { // assessment. Required when reCAPTCHA Enterprise is enabled. CaptchaResponse string `json:"captchaResponse,omitempty"` + // ClientType: The client type, web, android or ios. Required when + // reCAPTCHA Enterprise is enabled. + // + // Possible values: + // "CLIENT_TYPE_UNSPECIFIED" - Client type is not specified. + // "CLIENT_TYPE_WEB" - Client type is web. + // "CLIENT_TYPE_ANDROID" - Client type is android. + // "CLIENT_TYPE_IOS" - Client type is ios. + ClientType string `json:"clientType,omitempty"` + DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"` // Email: Required. The email the user is signing in with. The length of @@ -2951,6 +2980,15 @@ type GoogleCloudIdentitytoolkitV1SignInWithPasswordRequest struct { PendingIdToken string `json:"pendingIdToken,omitempty"` + // RecaptchaVersion: The reCAPTCHA version of the reCAPTCHA token in the + // captcha_response. + // + // Possible values: + // "RECAPTCHA_VERSION_UNSPECIFIED" - The reCAPTCHA version is not + // specified. + // "RECAPTCHA_ENTERPRISE" - The reCAPTCHA enterprise. + RecaptchaVersion string `json:"recaptchaVersion,omitempty"` + // ReturnSecureToken: Should always be true. ReturnSecureToken bool `json:"returnSecureToken,omitempty"` @@ -3215,6 +3253,16 @@ type GoogleCloudIdentitytoolkitV1SignUpRequest struct { // Required when reCAPTCHA enterprise is enabled. CaptchaResponse string `json:"captchaResponse,omitempty"` + // ClientType: The client type: web, Android or iOS. Required when + // enabling reCAPTCHA enterprise protection. + // + // Possible values: + // "CLIENT_TYPE_UNSPECIFIED" - Client type is not specified. + // "CLIENT_TYPE_WEB" - Client type is web. + // "CLIENT_TYPE_ANDROID" - Client type is android. + // "CLIENT_TYPE_IOS" - Client type is ios. + ClientType string `json:"clientType,omitempty"` + // Disabled: Whether the user will be disabled upon creation. Disabled // accounts are inaccessible except for requests bearing a Google OAuth2 // credential with proper permissions @@ -3271,6 +3319,15 @@ type GoogleCloudIdentitytoolkitV1SignUpRequest struct { // PhotoUrl: The profile photo url of the user to create. PhotoUrl string `json:"photoUrl,omitempty"` + // RecaptchaVersion: The reCAPTCHA version of the reCAPTCHA token in the + // captcha_response. + // + // Possible values: + // "RECAPTCHA_VERSION_UNSPECIFIED" - The reCAPTCHA version is not + // specified. + // "RECAPTCHA_ENTERPRISE" - The reCAPTCHA enterprise. + RecaptchaVersion string `json:"recaptchaVersion,omitempty"` + // TargetProjectId: The project ID of the project which the user should // belong to. Specifying this field requires a Google OAuth 2.0 // credential with the proper permissions diff --git a/identitytoolkit/v2/identitytoolkit-api.json b/identitytoolkit/v2/identitytoolkit-api.json index 66fb93f63d6..5c31dec06ca 100644 --- a/identitytoolkit/v2/identitytoolkit-api.json +++ b/identitytoolkit/v2/identitytoolkit-api.json @@ -109,6 +109,26 @@ "protocol": "rest", "resources": { "accounts": { + "methods": { + "revokeToken": { + "description": "Revokes a user's token from an Identity Provider (IdP). This is done by manually providing an IdP credential, and the token types for revocation. An [API key](https://cloud.google.com/docs/authentication/api-keys) is required in the request in order to identify the Google Cloud project.", + "flatPath": "v2/accounts:revokeToken", + "httpMethod": "POST", + "id": "identitytoolkit.accounts.revokeToken", + "parameterOrder": [], + "parameters": {}, + "path": "v2/accounts:revokeToken", + "request": { + "$ref": "GoogleCloudIdentitytoolkitV2RevokeTokenRequest" + }, + "response": { + "$ref": "GoogleCloudIdentitytoolkitV2RevokeTokenResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "mfaEnrollment": { "methods": { @@ -1557,9 +1577,64 @@ } } } + }, + "v2": { + "methods": { + "getRecaptchaConfig": { + "description": "Gets parameters needed for reCAPTCHA analysis.", + "flatPath": "v2/recaptchaConfig", + "httpMethod": "GET", + "id": "identitytoolkit.getRecaptchaConfig", + "parameterOrder": [], + "parameters": { + "clientType": { + "description": "reCAPTCHA Enterprise uses separate site keys for different client types. Specify the client type to get the corresponding key.", + "enum": [ + "CLIENT_TYPE_UNSPECIFIED", + "CLIENT_TYPE_WEB", + "CLIENT_TYPE_ANDROID", + "CLIENT_TYPE_IOS" + ], + "enumDescriptions": [ + "Client type is not specified.", + "Client type is web.", + "Client type is android.", + "Client type is ios." + ], + "location": "query", + "type": "string" + }, + "tenantId": { + "description": "The id of a tenant.", + "location": "query", + "type": "string" + }, + "version": { + "description": "The reCAPTCHA version.", + "enum": [ + "RECAPTCHA_VERSION_UNSPECIFIED", + "RECAPTCHA_ENTERPRISE" + ], + "enumDescriptions": [ + "The reCAPTCHA version is not specified.", + "Use reCAPTCHA Enterprise." + ], + "location": "query", + "type": "string" + } + }, + "path": "v2/recaptchaConfig", + "response": { + "$ref": "GoogleCloudIdentitytoolkitV2RecaptchaConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } }, - "revision": "20230327", + "revision": "20230410", "rootUrl": "https://identitytoolkit.googleapis.com/", "schemas": { "GoogleCloudIdentitytoolkitAdminV2AllowByDefault": { @@ -1754,6 +1829,10 @@ "$ref": "GoogleCloudIdentitytoolkitAdminV2QuotaConfig", "description": "Configuration related to quotas." }, + "recaptchaConfig": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig", + "description": "The project-level reCAPTCHA config." + }, "signIn": { "$ref": "GoogleCloudIdentitytoolkitAdminV2SignInConfig", "description": "Configuration related to local sign in methods." @@ -2417,6 +2496,99 @@ }, "type": "object" }, + "GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig": { + "description": "The reCAPTCHA Enterprise integration config.", + "id": "GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig", + "properties": { + "emailPasswordEnforcementState": { + "description": "The reCAPTCHA config for email/password provider, containing the enforcement status. The email/password provider contains all related user flows protected by reCAPTCHA.", + "enum": [ + "RECAPTCHA_PROVIDER_ENFORCEMENT_STATE_UNSPECIFIED", + "OFF", + "AUDIT", + "ENFORCE" + ], + "enumDescriptions": [ + "Enforcement state has not been set.", + "Unenforced.", + "reCAPTCHA assessment is created, result is not used to enforce.", + "reCAPTCHA assessment is created, result is used to enforce." + ], + "type": "string" + }, + "managedRules": { + "description": "The managed rules for authentication action based on reCAPTCHA scores. The rules are shared across providers for a given tenant project.", + "items": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule" + }, + "type": "array" + }, + "recaptchaKeys": { + "description": "Output only. The reCAPTCHA keys.", + "items": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2RecaptchaKey" + }, + "readOnly": true, + "type": "array" + }, + "useAccountDefender": { + "description": "Whether to use the account defender for reCAPTCHA assessment. Defaults to `false`.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudIdentitytoolkitAdminV2RecaptchaKey": { + "description": "The reCAPTCHA key config. reCAPTCHA Enterprise offers different keys for different client platforms.", + "id": "GoogleCloudIdentitytoolkitAdminV2RecaptchaKey", + "properties": { + "key": { + "description": "The reCAPTCHA Enterprise key resource name, e.g. \"projects/{project}/keys/{key}\"", + "type": "string" + }, + "type": { + "description": "The client's platform type.", + "enum": [ + "CLIENT_TYPE_UNSPECIFIED", + "WEB", + "IOS", + "ANDROID" + ], + "enumDescriptions": [ + "Client type is not specified.", + "Client type is web.", + "Client type is iOS.", + "Client type is Android." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule": { + "description": "The config for a reCAPTCHA managed rule. Models a single interval [start_score, end_score]. The start_score is implicit. It is either the closest smaller end_score (if one is available) or 0. Intervals in aggregate span [0, 1] without overlapping.", + "id": "GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule", + "properties": { + "action": { + "description": "The action taken if the reCAPTCHA score of a request is within the interval [start_score, end_score].", + "enum": [ + "RECAPTCHA_ACTION_UNSPECIFIED", + "BLOCK" + ], + "enumDescriptions": [ + "The reCAPTCHA action is not specified.", + "The reCAPTCHA-protected request will be blocked." + ], + "type": "string" + }, + "endScore": { + "description": "The end score (inclusive) of the score range for an action. Must be a value between 0.0 and 1.0, at 11 discrete values; e.g. 0, 0.1, 0.2, 0.3, ... 0.9, 1.0. A score of 0.0 indicates the riskiest request (likely a bot), whereas 1.0 indicates the safest request (likely a human). See https://cloud.google.com/recaptcha-enterprise/docs/interpret-assessment.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudIdentitytoolkitAdminV2RequestLogging": { "description": "Configuration for logging requests made to this project to Stackdriver Logging", "id": "GoogleCloudIdentitytoolkitAdminV2RequestLogging", @@ -2713,6 +2885,10 @@ "readOnly": true, "type": "string" }, + "recaptchaConfig": { + "$ref": "GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig", + "description": "The tenant-level reCAPTCHA config." + }, "smsRegionConfig": { "$ref": "GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig", "description": "Configures which regions are enabled for SMS verification code sending." @@ -2937,6 +3113,108 @@ }, "type": "object" }, + "GoogleCloudIdentitytoolkitV2RecaptchaConfig": { + "description": "Configuration for reCAPTCHA", + "id": "GoogleCloudIdentitytoolkitV2RecaptchaConfig", + "properties": { + "recaptchaEnforcementState": { + "description": "The reCAPTCHA enforcement state for the providers that GCIP supports reCAPTCHA protection.", + "items": { + "$ref": "GoogleCloudIdentitytoolkitV2RecaptchaEnforcementState" + }, + "type": "array" + }, + "recaptchaKey": { + "description": "The reCAPTCHA Enterprise key resource name, e.g. \"projects/{project}/keys/{key}\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudIdentitytoolkitV2RecaptchaEnforcementState": { + "description": "Enforcement states for reCAPTCHA protection.", + "id": "GoogleCloudIdentitytoolkitV2RecaptchaEnforcementState", + "properties": { + "enforcementState": { + "description": "The reCAPTCHA enforcement state for the provider.", + "enum": [ + "ENFORCEMENT_STATE_UNSPECIFIED", + "OFF", + "AUDIT", + "ENFORCE" + ], + "enumDescriptions": [ + "Enforcement state has not been set.", + "Unenforced.", + "reCAPTCHA assessment is created, result is not used to enforce.", + "reCAPTCHA assessment is created, result is used to enforce." + ], + "type": "string" + }, + "provider": { + "description": "The provider that has reCAPTCHA protection.", + "enum": [ + "RECAPTCHA_PROVIDER_UNSPECIFIED", + "EMAIL_PASSWORD_PROVIDER" + ], + "enumDescriptions": [ + "reCAPTCHA provider not specified", + "Email password provider" + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudIdentitytoolkitV2RevokeTokenRequest": { + "description": "Request message for RevokeToken.", + "id": "GoogleCloudIdentitytoolkitV2RevokeTokenRequest", + "properties": { + "idToken": { + "description": "Required. A valid Identity Platform ID token to link the account. If there was a successful token revocation request on the account and no tokens are generated after the revocation, the duplicate requests will be ignored and returned immediately.", + "type": "string" + }, + "providerId": { + "description": "Required. The idp provider for the token. Currently only supports Apple Idp. The format should be \"apple.com\".", + "type": "string" + }, + "redirectUri": { + "description": "The redirect URI provided in the initial authorization request made by the client to the IDP. The URI must use the HTTPS protocol, include a domain name, and can’t contain an IP address or localhost. Required if token_type is CODE.", + "type": "string" + }, + "tenantId": { + "description": "The ID of the Identity Platform tenant the user is signing in to. If not set, the user will sign in to the default Identity Platform project.", + "type": "string" + }, + "token": { + "description": "Required. The token to be revoked. If an authorization_code is passed in, the API will first exchange the code for access token and then revoke the token exchanged.", + "type": "string" + }, + "tokenType": { + "description": "Required. The type of the token to be revoked.", + "enum": [ + "TOKEN_TYPE_UNSPECIFIED", + "REFRESH_TOKEN", + "ACCESS_TOKEN", + "CODE" + ], + "enumDescriptions": [ + "Default value, do not use.", + "Token type is refresh_token.", + "Token type is access_token.", + "Token type is authorization_code." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudIdentitytoolkitV2RevokeTokenResponse": { + "description": "Response message for RevokeToken. Empty for now.", + "id": "GoogleCloudIdentitytoolkitV2RevokeTokenResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudIdentitytoolkitV2StartMfaEnrollmentRequest": { "description": "Sends MFA enrollment verification SMS for a user.", "id": "GoogleCloudIdentitytoolkitV2StartMfaEnrollmentRequest", diff --git a/identitytoolkit/v2/identitytoolkit-gen.go b/identitytoolkit/v2/identitytoolkit-gen.go index 4cd33b6c907..24cca3713e3 100644 --- a/identitytoolkit/v2/identitytoolkit-gen.go +++ b/identitytoolkit/v2/identitytoolkit-gen.go @@ -130,6 +130,7 @@ func New(client *http.Client) (*Service, error) { s.Accounts = NewAccountsService(s) s.DefaultSupportedIdps = NewDefaultSupportedIdpsService(s) s.Projects = NewProjectsService(s) + s.V2 = NewV2Service(s) return s, nil } @@ -143,6 +144,8 @@ type Service struct { DefaultSupportedIdps *DefaultSupportedIdpsService Projects *ProjectsService + + V2 *V2Service } func (s *Service) userAgent() string { @@ -299,6 +302,15 @@ type ProjectsTenantsOauthIdpConfigsService struct { s *Service } +func NewV2Service(s *Service) *V2Service { + rs := &V2Service{s: s} + return rs +} + +type V2Service struct { + s *Service +} + // GoogleCloudIdentitytoolkitAdminV2AllowByDefault: Defines a policy of // allowing every region by default and adding disallowed regions to a // disallow list. @@ -645,6 +657,9 @@ type GoogleCloudIdentitytoolkitAdminV2Config struct { // Quota: Configuration related to quotas. Quota *GoogleCloudIdentitytoolkitAdminV2QuotaConfig `json:"quota,omitempty"` + // RecaptchaConfig: The project-level reCAPTCHA config. + RecaptchaConfig *GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig `json:"recaptchaConfig,omitempty"` + // SignIn: Configuration related to local sign in methods. SignIn *GoogleCloudIdentitytoolkitAdminV2SignInConfig `json:"signIn,omitempty"` @@ -1811,6 +1826,161 @@ func (s *GoogleCloudIdentitytoolkitAdminV2QuotaConfig) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig: The reCAPTCHA +// Enterprise integration config. +type GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig struct { + // EmailPasswordEnforcementState: The reCAPTCHA config for + // email/password provider, containing the enforcement status. The + // email/password provider contains all related user flows protected by + // reCAPTCHA. + // + // Possible values: + // "RECAPTCHA_PROVIDER_ENFORCEMENT_STATE_UNSPECIFIED" - Enforcement + // state has not been set. + // "OFF" - Unenforced. + // "AUDIT" - reCAPTCHA assessment is created, result is not used to + // enforce. + // "ENFORCE" - reCAPTCHA assessment is created, result is used to + // enforce. + EmailPasswordEnforcementState string `json:"emailPasswordEnforcementState,omitempty"` + + // ManagedRules: The managed rules for authentication action based on + // reCAPTCHA scores. The rules are shared across providers for a given + // tenant project. + ManagedRules []*GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule `json:"managedRules,omitempty"` + + // RecaptchaKeys: Output only. The reCAPTCHA keys. + RecaptchaKeys []*GoogleCloudIdentitytoolkitAdminV2RecaptchaKey `json:"recaptchaKeys,omitempty"` + + // UseAccountDefender: Whether to use the account defender for reCAPTCHA + // assessment. Defaults to `false`. + UseAccountDefender bool `json:"useAccountDefender,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EmailPasswordEnforcementState") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EmailPasswordEnforcementState") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudIdentitytoolkitAdminV2RecaptchaKey: The reCAPTCHA key +// config. reCAPTCHA Enterprise offers different keys for different +// client platforms. +type GoogleCloudIdentitytoolkitAdminV2RecaptchaKey struct { + // Key: The reCAPTCHA Enterprise key resource name, e.g. + // "projects/{project}/keys/{key}" + Key string `json:"key,omitempty"` + + // Type: The client's platform type. + // + // Possible values: + // "CLIENT_TYPE_UNSPECIFIED" - Client type is not specified. + // "WEB" - Client type is web. + // "IOS" - Client type is iOS. + // "ANDROID" - Client type is Android. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitAdminV2RecaptchaKey) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitAdminV2RecaptchaKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule: The config for +// a reCAPTCHA managed rule. Models a single interval [start_score, +// end_score]. The start_score is implicit. It is either the closest +// smaller end_score (if one is available) or 0. Intervals in aggregate +// span [0, 1] without overlapping. +type GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule struct { + // Action: The action taken if the reCAPTCHA score of a request is + // within the interval [start_score, end_score]. + // + // Possible values: + // "RECAPTCHA_ACTION_UNSPECIFIED" - The reCAPTCHA action is not + // specified. + // "BLOCK" - The reCAPTCHA-protected request will be blocked. + Action string `json:"action,omitempty"` + + // EndScore: The end score (inclusive) of the score range for an action. + // Must be a value between 0.0 and 1.0, at 11 discrete values; e.g. 0, + // 0.1, 0.2, 0.3, ... 0.9, 1.0. A score of 0.0 indicates the riskiest + // request (likely a bot), whereas 1.0 indicates the safest request + // (likely a human). See + // https://cloud.google.com/recaptcha-enterprise/docs/interpret-assessment. + EndScore float64 `json:"endScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule + var s1 struct { + EndScore gensupport.JSONFloat64 `json:"endScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.EndScore = float64(s1.EndScore) + return nil +} + // GoogleCloudIdentitytoolkitAdminV2RequestLogging: Configuration for // logging requests made to this project to Stackdriver Logging type GoogleCloudIdentitytoolkitAdminV2RequestLogging struct { @@ -2259,6 +2429,9 @@ type GoogleCloudIdentitytoolkitAdminV2Tenant struct { // "projects/{project-id}/tenants/{tenant-id}" Name string `json:"name,omitempty"` + // RecaptchaConfig: The tenant-level reCAPTCHA config. + RecaptchaConfig *GoogleCloudIdentitytoolkitAdminV2RecaptchaConfig `json:"recaptchaConfig,omitempty"` + // SmsRegionConfig: Configures which regions are enabled for SMS // verification code sending. SmsRegionConfig *GoogleCloudIdentitytoolkitAdminV2SmsRegionConfig `json:"smsRegionConfig,omitempty"` @@ -2713,6 +2886,161 @@ func (s *GoogleCloudIdentitytoolkitV2MfaTotpSignInRequestInfo) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudIdentitytoolkitV2RecaptchaConfig: Configuration for +// reCAPTCHA +type GoogleCloudIdentitytoolkitV2RecaptchaConfig struct { + // RecaptchaEnforcementState: The reCAPTCHA enforcement state for the + // providers that GCIP supports reCAPTCHA protection. + RecaptchaEnforcementState []*GoogleCloudIdentitytoolkitV2RecaptchaEnforcementState `json:"recaptchaEnforcementState,omitempty"` + + // RecaptchaKey: The reCAPTCHA Enterprise key resource name, e.g. + // "projects/{project}/keys/{key}". + RecaptchaKey string `json:"recaptchaKey,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "RecaptchaEnforcementState") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "RecaptchaEnforcementState") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitV2RecaptchaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitV2RecaptchaConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudIdentitytoolkitV2RecaptchaEnforcementState: Enforcement +// states for reCAPTCHA protection. +type GoogleCloudIdentitytoolkitV2RecaptchaEnforcementState struct { + // EnforcementState: The reCAPTCHA enforcement state for the provider. + // + // Possible values: + // "ENFORCEMENT_STATE_UNSPECIFIED" - Enforcement state has not been + // set. + // "OFF" - Unenforced. + // "AUDIT" - reCAPTCHA assessment is created, result is not used to + // enforce. + // "ENFORCE" - reCAPTCHA assessment is created, result is used to + // enforce. + EnforcementState string `json:"enforcementState,omitempty"` + + // Provider: The provider that has reCAPTCHA protection. + // + // Possible values: + // "RECAPTCHA_PROVIDER_UNSPECIFIED" - reCAPTCHA provider not specified + // "EMAIL_PASSWORD_PROVIDER" - Email password provider + Provider string `json:"provider,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EnforcementState") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnforcementState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitV2RecaptchaEnforcementState) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitV2RecaptchaEnforcementState + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudIdentitytoolkitV2RevokeTokenRequest: Request message for +// RevokeToken. +type GoogleCloudIdentitytoolkitV2RevokeTokenRequest struct { + // IdToken: Required. A valid Identity Platform ID token to link the + // account. If there was a successful token revocation request on the + // account and no tokens are generated after the revocation, the + // duplicate requests will be ignored and returned immediately. + IdToken string `json:"idToken,omitempty"` + + // ProviderId: Required. The idp provider for the token. Currently only + // supports Apple Idp. The format should be "apple.com". + ProviderId string `json:"providerId,omitempty"` + + // RedirectUri: The redirect URI provided in the initial authorization + // request made by the client to the IDP. The URI must use the HTTPS + // protocol, include a domain name, and can’t contain an IP address or + // localhost. Required if token_type is CODE. + RedirectUri string `json:"redirectUri,omitempty"` + + // TenantId: The ID of the Identity Platform tenant the user is signing + // in to. If not set, the user will sign in to the default Identity + // Platform project. + TenantId string `json:"tenantId,omitempty"` + + // Token: Required. The token to be revoked. If an authorization_code is + // passed in, the API will first exchange the code for access token and + // then revoke the token exchanged. + Token string `json:"token,omitempty"` + + // TokenType: Required. The type of the token to be revoked. + // + // Possible values: + // "TOKEN_TYPE_UNSPECIFIED" - Default value, do not use. + // "REFRESH_TOKEN" - Token type is refresh_token. + // "ACCESS_TOKEN" - Token type is access_token. + // "CODE" - Token type is authorization_code. + TokenType string `json:"tokenType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IdToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IdToken") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudIdentitytoolkitV2RevokeTokenRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudIdentitytoolkitV2RevokeTokenRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudIdentitytoolkitV2RevokeTokenResponse: Response message for +// RevokeToken. Empty for now. +type GoogleCloudIdentitytoolkitV2RevokeTokenResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // GoogleCloudIdentitytoolkitV2StartMfaEnrollmentRequest: Sends MFA // enrollment verification SMS for a user. type GoogleCloudIdentitytoolkitV2StartMfaEnrollmentRequest struct { @@ -3628,6 +3956,139 @@ func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// method id "identitytoolkit.accounts.revokeToken": + +type AccountsRevokeTokenCall struct { + s *Service + googlecloudidentitytoolkitv2revoketokenrequest *GoogleCloudIdentitytoolkitV2RevokeTokenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RevokeToken: Revokes a user's token from an Identity Provider (IdP). +// This is done by manually providing an IdP credential, and the token +// types for revocation. An API key +// (https://cloud.google.com/docs/authentication/api-keys) is required +// in the request in order to identify the Google Cloud project. +func (r *AccountsService) RevokeToken(googlecloudidentitytoolkitv2revoketokenrequest *GoogleCloudIdentitytoolkitV2RevokeTokenRequest) *AccountsRevokeTokenCall { + c := &AccountsRevokeTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googlecloudidentitytoolkitv2revoketokenrequest = googlecloudidentitytoolkitv2revoketokenrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsRevokeTokenCall) Fields(s ...googleapi.Field) *AccountsRevokeTokenCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsRevokeTokenCall) Context(ctx context.Context) *AccountsRevokeTokenCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsRevokeTokenCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsRevokeTokenCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudidentitytoolkitv2revoketokenrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/accounts:revokeToken") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "identitytoolkit.accounts.revokeToken" call. +// Exactly one of *GoogleCloudIdentitytoolkitV2RevokeTokenResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudIdentitytoolkitV2RevokeTokenResponse.ServerResponse.Header +// +// or (if a response was returned at all) in +// +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsRevokeTokenCall) Do(opts ...googleapi.CallOption) (*GoogleCloudIdentitytoolkitV2RevokeTokenResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudIdentitytoolkitV2RevokeTokenResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Revokes a user's token from an Identity Provider (IdP). This is done by manually providing an IdP credential, and the token types for revocation. An [API key](https://cloud.google.com/docs/authentication/api-keys) is required in the request in order to identify the Google Cloud project.", + // "flatPath": "v2/accounts:revokeToken", + // "httpMethod": "POST", + // "id": "identitytoolkit.accounts.revokeToken", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v2/accounts:revokeToken", + // "request": { + // "$ref": "GoogleCloudIdentitytoolkitV2RevokeTokenRequest" + // }, + // "response": { + // "$ref": "GoogleCloudIdentitytoolkitV2RevokeTokenResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "identitytoolkit.accounts.mfaEnrollment.finalize": type AccountsMfaEnrollmentFinalizeCall struct { @@ -10993,3 +11454,205 @@ func (c *ProjectsTenantsOauthIdpConfigsPatchCall) Do(opts ...googleapi.CallOptio // } } + +// method id "identitytoolkit.getRecaptchaConfig": + +type V2GetRecaptchaConfigCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetRecaptchaConfig: Gets parameters needed for reCAPTCHA analysis. +func (r *V2Service) GetRecaptchaConfig() *V2GetRecaptchaConfigCall { + c := &V2GetRecaptchaConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// ClientType sets the optional parameter "clientType": reCAPTCHA +// Enterprise uses separate site keys for different client types. +// Specify the client type to get the corresponding key. +// +// Possible values: +// +// "CLIENT_TYPE_UNSPECIFIED" - Client type is not specified. +// "CLIENT_TYPE_WEB" - Client type is web. +// "CLIENT_TYPE_ANDROID" - Client type is android. +// "CLIENT_TYPE_IOS" - Client type is ios. +func (c *V2GetRecaptchaConfigCall) ClientType(clientType string) *V2GetRecaptchaConfigCall { + c.urlParams_.Set("clientType", clientType) + return c +} + +// TenantId sets the optional parameter "tenantId": The id of a tenant. +func (c *V2GetRecaptchaConfigCall) TenantId(tenantId string) *V2GetRecaptchaConfigCall { + c.urlParams_.Set("tenantId", tenantId) + return c +} + +// Version sets the optional parameter "version": The reCAPTCHA version. +// +// Possible values: +// +// "RECAPTCHA_VERSION_UNSPECIFIED" - The reCAPTCHA version is not +// +// specified. +// +// "RECAPTCHA_ENTERPRISE" - Use reCAPTCHA Enterprise. +func (c *V2GetRecaptchaConfigCall) Version(version string) *V2GetRecaptchaConfigCall { + c.urlParams_.Set("version", version) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *V2GetRecaptchaConfigCall) Fields(s ...googleapi.Field) *V2GetRecaptchaConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *V2GetRecaptchaConfigCall) IfNoneMatch(entityTag string) *V2GetRecaptchaConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *V2GetRecaptchaConfigCall) Context(ctx context.Context) *V2GetRecaptchaConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *V2GetRecaptchaConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *V2GetRecaptchaConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/recaptchaConfig") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "identitytoolkit.getRecaptchaConfig" call. +// Exactly one of *GoogleCloudIdentitytoolkitV2RecaptchaConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudIdentitytoolkitV2RecaptchaConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *V2GetRecaptchaConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudIdentitytoolkitV2RecaptchaConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudIdentitytoolkitV2RecaptchaConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets parameters needed for reCAPTCHA analysis.", + // "flatPath": "v2/recaptchaConfig", + // "httpMethod": "GET", + // "id": "identitytoolkit.getRecaptchaConfig", + // "parameterOrder": [], + // "parameters": { + // "clientType": { + // "description": "reCAPTCHA Enterprise uses separate site keys for different client types. Specify the client type to get the corresponding key.", + // "enum": [ + // "CLIENT_TYPE_UNSPECIFIED", + // "CLIENT_TYPE_WEB", + // "CLIENT_TYPE_ANDROID", + // "CLIENT_TYPE_IOS" + // ], + // "enumDescriptions": [ + // "Client type is not specified.", + // "Client type is web.", + // "Client type is android.", + // "Client type is ios." + // ], + // "location": "query", + // "type": "string" + // }, + // "tenantId": { + // "description": "The id of a tenant.", + // "location": "query", + // "type": "string" + // }, + // "version": { + // "description": "The reCAPTCHA version.", + // "enum": [ + // "RECAPTCHA_VERSION_UNSPECIFIED", + // "RECAPTCHA_ENTERPRISE" + // ], + // "enumDescriptions": [ + // "The reCAPTCHA version is not specified.", + // "Use reCAPTCHA Enterprise." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/recaptchaConfig", + // "response": { + // "$ref": "GoogleCloudIdentitytoolkitV2RecaptchaConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/managedidentities/v1alpha1/managedidentities-api.json b/managedidentities/v1alpha1/managedidentities-api.json index 9f9fccfea1e..5355626bda6 100644 --- a/managedidentities/v1alpha1/managedidentities-api.json +++ b/managedidentities/v1alpha1/managedidentities-api.json @@ -1212,7 +1212,7 @@ ] }, "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.", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", "flatPath": "v1alpha1/projects/{projectsId}/locations/global/operations", "httpMethod": "GET", "id": "managedidentities.projects.locations.global.operations.list", @@ -1515,7 +1515,7 @@ } } }, - "revision": "20230227", + "revision": "20230323", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1869,6 +1869,10 @@ "description": "DomainJoinMachineRequest is the request message for DomainJoinMachine method", "id": "DomainJoinMachineRequest", "properties": { + "force": { + "description": "Optional. force if True, forces domain join even if the computer account already exists.", + "type": "boolean" + }, "ouName": { "description": "Optional. OU name where the VM needs to be domain joined", "type": "string" diff --git a/managedidentities/v1alpha1/managedidentities-gen.go b/managedidentities/v1alpha1/managedidentities-gen.go index 97d8441f422..2d82e29df9b 100644 --- a/managedidentities/v1alpha1/managedidentities-gen.go +++ b/managedidentities/v1alpha1/managedidentities-gen.go @@ -766,6 +766,10 @@ func (s *Domain) MarshalJSON() ([]byte, error) { // DomainJoinMachineRequest: DomainJoinMachineRequest is the request // message for DomainJoinMachine method type DomainJoinMachineRequest struct { + // Force: Optional. force if True, forces domain join even if the + // computer account already exists. + Force bool `json:"force,omitempty"` + // OuName: Optional. OU name where the VM needs to be domain joined OuName string `json:"ouName,omitempty"` @@ -774,7 +778,7 @@ type DomainJoinMachineRequest struct { // https://cloud.google.com/compute/docs/instances/verifying-instance-identity#request_signature VmIdToken string `json:"vmIdToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "OuName") to + // ForceSendFields is a list of field names (e.g. "Force") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -782,7 +786,7 @@ type DomainJoinMachineRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OuName") to include in API + // NullFields is a list of field names (e.g. "Force") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8641,14 +8645,7 @@ type ProjectsLocationsGlobalOperationsListCall struct { // List: 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. +// `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. func (r *ProjectsLocationsGlobalOperationsService) List(name string) *ProjectsLocationsGlobalOperationsListCall { @@ -8777,7 +8774,7 @@ func (c *ProjectsLocationsGlobalOperationsListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. 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.", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/operations", // "httpMethod": "GET", // "id": "managedidentities.projects.locations.global.operations.list", diff --git a/managedidentities/v1beta1/managedidentities-api.json b/managedidentities/v1beta1/managedidentities-api.json index 3d648ddb090..5af0416f0f8 100644 --- a/managedidentities/v1beta1/managedidentities-api.json +++ b/managedidentities/v1beta1/managedidentities-api.json @@ -1212,7 +1212,7 @@ ] }, "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.", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", "flatPath": "v1beta1/projects/{projectsId}/locations/global/operations", "httpMethod": "GET", "id": "managedidentities.projects.locations.global.operations.list", @@ -1515,7 +1515,7 @@ } } }, - "revision": "20230227", + "revision": "20230323", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1878,6 +1878,10 @@ "description": "DomainJoinMachineRequest is the request message for DomainJoinMachine method", "id": "DomainJoinMachineRequest", "properties": { + "force": { + "description": "Optional. force if True, forces domain join even if the computer account already exists.", + "type": "boolean" + }, "ouName": { "description": "Optional. OU name to which the VM needs to be domain joined. If the field is not provided, the VM is joined to the default OU which is created. The default OU for the domain join api is created as GCE Instances under the Cloud OU. Example - OU=GCE Instances,OU=Cloud,DC=ad,DC=test,DC=com If the field is provided, then the custom OU is searched for under GCE Instances OU. Example - if ou_name=test_ou then the VM is domain joined to the following OU: OU=test_ou,OU=GCE Instances,OU=Cloud,DC=ad,DC=test,DC=com if present. If OU is not present under GCE Instances, then error is returned.", "type": "string" diff --git a/managedidentities/v1beta1/managedidentities-gen.go b/managedidentities/v1beta1/managedidentities-gen.go index a5f9a7927c3..0e8a901872f 100644 --- a/managedidentities/v1beta1/managedidentities-gen.go +++ b/managedidentities/v1beta1/managedidentities-gen.go @@ -763,6 +763,10 @@ func (s *Domain) MarshalJSON() ([]byte, error) { // DomainJoinMachineRequest: DomainJoinMachineRequest is the request // message for DomainJoinMachine method type DomainJoinMachineRequest struct { + // Force: Optional. force if True, forces domain join even if the + // computer account already exists. + Force bool `json:"force,omitempty"` + // OuName: Optional. OU name to which the VM needs to be domain joined. // If the field is not provided, the VM is joined to the default OU // which is created. The default OU for the domain join api is created @@ -779,7 +783,7 @@ type DomainJoinMachineRequest struct { // https://cloud.google.com/compute/docs/instances/verifying-instance-identity#request_signature VmIdToken string `json:"vmIdToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "OuName") to + // ForceSendFields is a list of field names (e.g. "Force") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -787,7 +791,7 @@ type DomainJoinMachineRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OuName") to include in API + // NullFields is a list of field names (e.g. "Force") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8654,14 +8658,7 @@ type ProjectsLocationsGlobalOperationsListCall struct { // List: 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. +// `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. func (r *ProjectsLocationsGlobalOperationsService) List(name string) *ProjectsLocationsGlobalOperationsListCall { @@ -8790,7 +8787,7 @@ func (c *ProjectsLocationsGlobalOperationsListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. 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.", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", // "flatPath": "v1beta1/projects/{projectsId}/locations/global/operations", // "httpMethod": "GET", // "id": "managedidentities.projects.locations.global.operations.list", diff --git a/migrationcenter/v1alpha1/migrationcenter-api.json b/migrationcenter/v1alpha1/migrationcenter-api.json index 15230bbbf15..a60b6a1bf4f 100644 --- a/migrationcenter/v1alpha1/migrationcenter-api.json +++ b/migrationcenter/v1alpha1/migrationcenter-api.json @@ -2005,7 +2005,7 @@ } } }, - "revision": "20230324", + "revision": "20230404", "rootUrl": "https://migrationcenter.googleapis.com/", "schemas": { "AddAssetsToGroupRequest": { @@ -2328,7 +2328,7 @@ "id": "AssetList", "properties": { "assetIds": { - "description": "A list of asset IDs", + "description": "Required. A list of asset IDs", "items": { "type": "string" }, @@ -3260,7 +3260,7 @@ "type": "string" }, "format": { - "description": "The payload format.", + "description": "Required. The payload format.", "enum": [ "IMPORT_JOB_FORMAT_UNSPECIFIED", "IMPORT_JOB_FORMAT_CMDB", @@ -4419,7 +4419,7 @@ "type": "string" }, "groupPreferencesetAssignments": { - "description": "Collection of combinations of groups and preference sets.", + "description": "Required. Collection of combinations of groups and preference sets.", "items": { "$ref": "ReportConfigGroupPreferenceSetAssignment" }, @@ -4444,11 +4444,11 @@ "id": "ReportConfigGroupPreferenceSetAssignment", "properties": { "group": { - "description": "Name of the group.", + "description": "Required. Name of the group.", "type": "string" }, "preferenceSet": { - "description": "Name of the Preference Set.", + "description": "Required. Name of the Preference Set.", "type": "string" } }, diff --git a/migrationcenter/v1alpha1/migrationcenter-gen.go b/migrationcenter/v1alpha1/migrationcenter-gen.go index 59071ee8419..e54c8c01270 100644 --- a/migrationcenter/v1alpha1/migrationcenter-gen.go +++ b/migrationcenter/v1alpha1/migrationcenter-gen.go @@ -804,7 +804,7 @@ func (s *AssetFrame) MarshalJSON() ([]byte, error) { // AssetList: Lists the asset IDs of all assets. type AssetList struct { - // AssetIds: A list of asset IDs + // AssetIds: Required. A list of asset IDs AssetIds []string `json:"assetIds,omitempty"` // ForceSendFields is a list of field names (e.g. "AssetIds") to @@ -2396,7 +2396,7 @@ type ImportDataFile struct { // characters. DisplayName string `json:"displayName,omitempty"` - // Format: The payload format. + // Format: Required. The payload format. // // Possible values: // "IMPORT_JOB_FORMAT_UNSPECIFIED" - Default value. @@ -4215,8 +4215,8 @@ type ReportConfig struct { // characters. DisplayName string `json:"displayName,omitempty"` - // GroupPreferencesetAssignments: Collection of combinations of groups - // and preference sets. + // GroupPreferencesetAssignments: Required. Collection of combinations + // of groups and preference sets. GroupPreferencesetAssignments []*ReportConfigGroupPreferenceSetAssignment `json:"groupPreferencesetAssignments,omitempty"` // Name: Output only. Name of resource. @@ -4256,10 +4256,10 @@ func (s *ReportConfig) MarshalJSON() ([]byte, error) { // ReportConfigGroupPreferenceSetAssignment: Represents a combination of // a group with a preference set. type ReportConfigGroupPreferenceSetAssignment struct { - // Group: Name of the group. + // Group: Required. Name of the group. Group string `json:"group,omitempty"` - // PreferenceSet: Name of the Preference Set. + // PreferenceSet: Required. Name of the Preference Set. PreferenceSet string `json:"preferenceSet,omitempty"` // ForceSendFields is a list of field names (e.g. "Group") to diff --git a/networksecurity/v1/networksecurity-api.json b/networksecurity/v1/networksecurity-api.json index 4e36db3d21d..68af7b58535 100644 --- a/networksecurity/v1/networksecurity-api.json +++ b/networksecurity/v1/networksecurity-api.json @@ -665,6 +665,322 @@ } } }, + "gatewaySecurityPolicies": { + "methods": { + "create": { + "description": "Creates a new GatewaySecurityPolicy in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.gatewaySecurityPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "gatewaySecurityPolicyId": { + "description": "Required. Short name of the GatewaySecurityPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"gateway_security_policy1\".", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the GatewaySecurityPolicy. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/gatewaySecurityPolicies", + "request": { + "$ref": "GatewaySecurityPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single GatewaySecurityPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.gatewaySecurityPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the GatewaySecurityPolicy to delete. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single GatewaySecurityPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.gatewaySecurityPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the GatewaySecurityPolicy to get. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GatewaySecurityPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists GatewaySecurityPolicies in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.gatewaySecurityPolicies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of GatewaySecurityPolicies to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last 'ListGatewaySecurityPoliciesResponse' Indicates that this is a continuation of a prior 'ListGatewaySecurityPolicies' call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the GatewaySecurityPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/gatewaySecurityPolicies", + "response": { + "$ref": "ListGatewaySecurityPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single GatewaySecurityPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.gatewaySecurityPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} gateway_security_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the GatewaySecurityPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GatewaySecurityPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "rules": { + "methods": { + "create": { + "description": "Creates a new GatewaySecurityPolicy in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "gatewaySecurityPolicyRuleId": { + "description": "The ID to use for the rule, which will become the final component of the rule's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent where this rule will be created. Format : projects/{project}/location/{location}/gatewaySecurityPolicies/*", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/rules", + "request": { + "$ref": "GatewaySecurityPolicyRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single GatewaySecurityPolicyRule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the GatewaySecurityPolicyRule to delete. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}/rules/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single GatewaySecurityPolicyRule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the GatewaySecurityPolicyRule to retrieve. Format: projects/{project}/location/{location}/gatewaySecurityPolicies/*/rules/*", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GatewaySecurityPolicyRule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists GatewaySecurityPolicyRules in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of GatewaySecurityPolicyRules to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a continuation of a prior 'ListGatewaySecurityPolicyRules' call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project, location and GatewaySecurityPolicy from which the GatewaySecurityPolicyRules should be listed, specified in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/rules", + "response": { + "$ref": "ListGatewaySecurityPolicyRulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single GatewaySecurityPolicyRule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the GatewaySecurityPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GatewaySecurityPolicyRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "operations": { "methods": { "cancel": { @@ -920,44 +1236,419 @@ "type": "integer" }, "pageToken": { - "description": "The value returned by the last `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListServerTlsPolicies` call, and that the system should return the next page of data.", + "description": "The value returned by the last `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListServerTlsPolicies` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/serverTlsPolicies", + "response": { + "$ref": "ListServerTlsPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single ServerTlsPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.serverTlsPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "ServerTlsPolicy" + }, + "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}/serverTlsPolicies/{serverTlsPoliciesId}:setIamPolicy", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:testIamPermissions", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "tlsInspectionPolicies": { + "methods": { + "create": { + "description": "Creates a new TlsInspectionPolicy in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the TlsInspectionPolicy. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "tlsInspectionPolicyId": { + "description": "Required. Short name of the TlsInspectionPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"tls_inspection_policy1\".", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/tlsInspectionPolicies", + "request": { + "$ref": "TlsInspectionPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single TlsInspectionPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "If set to true, any rules for this TlsInspectionPolicy will also be deleted. (Otherwise, the request will only work if the TlsInspectionPolicy has no rules.)", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. A name of the TlsInspectionPolicy to delete. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single TlsInspectionPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the TlsInspectionPolicy to get. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "TlsInspectionPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists TlsInspectionPolicies in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of TlsInspectionPolicies to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last 'ListTlsInspectionPoliciesResponse' Indicates that this is a continuation of a prior 'ListTlsInspectionPolicies' call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the TlsInspectionPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/tlsInspectionPolicies", + "response": { + "$ref": "ListTlsInspectionPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single TlsInspectionPolicy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} tls_inspection_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsInspectionPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "TlsInspectionPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "urlLists": { + "methods": { + "create": { + "description": "Creates a new UrlList in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.urlLists.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the UrlList. Must be in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "urlListId": { + "description": "Required. Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"url_list\".", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/urlLists", + "request": { + "$ref": "UrlList" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single UrlList.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.urlLists.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the UrlList to delete. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single UrlList.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.urlLists.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the UrlList to get. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "UrlList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists UrlLists in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.urlLists.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of UrlLists to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListUrlListsResponse` Indicates that this is a continuation of a prior `ListUrlLists` call, and that the system should return the next page of data.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", + "description": "Required. The project and location from which the UrlLists should be listed, specified in the format `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+parent}/serverTlsPolicies", + "path": "v1/{+parent}/urlLists", "response": { - "$ref": "ListServerTlsPoliciesResponse" + "$ref": "ListUrlListsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates the parameters of a single ServerTlsPolicy.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + "description": "Updates the parameters of a single UrlList.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.serverTlsPolicies.patch", + "id": "networksecurity.projects.locations.urlLists.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", + "description": "Required. Name of the resource provided by the user. Name is of the form projects/{project}/locations/{location}/urlLists/{url_list} url_list should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "description": "Optional. Field mask is used to specify the fields to be overwritten in the UrlList resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -965,7 +1656,7 @@ }, "path": "v1/{+name}", "request": { - "$ref": "ServerTlsPolicy" + "$ref": "UrlList" }, "response": { "$ref": "Operation" @@ -973,62 +1664,6 @@ "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}/serverTlsPolicies/{serverTlsPoliciesId}:setIamPolicy", - "httpMethod": "POST", - "id": "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "GoogleIamV1SetIamPolicyRequest" - }, - "response": { - "$ref": "GoogleIamV1Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:testIamPermissions", - "httpMethod": "POST", - "id": "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "GoogleIamV1TestIamPermissionsRequest" - }, - "response": { - "$ref": "GoogleIamV1TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } } @@ -1037,7 +1672,7 @@ } } }, - "revision": "20230306", + "revision": "20230406", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AuthorizationPolicy": { @@ -1223,6 +1858,99 @@ }, "type": "object" }, + "GatewaySecurityPolicy": { + "description": "The GatewaySecurityPolicy resource contains a collection of GatewaySecurityPolicyRules and associated metadata.", + "id": "GatewaySecurityPolicy", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Free-text description of the resource.", + "type": "string" + }, + "name": { + "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} gateway_security_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "type": "string" + }, + "tlsInspectionPolicy": { + "description": "Optional. Name of a TLS Inspection Policy resource that defines how TLS inspection will be performed for any rule(s) which enables it.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GatewaySecurityPolicyRule": { + "description": "The GatewaySecurityPolicyRule resource is in a nested collection within a GatewaySecurityPolicy and represents a traffic matching condition and associated action to perform.", + "id": "GatewaySecurityPolicyRule", + "properties": { + "applicationMatcher": { + "description": "Optional. CEL expression for matching on L7/application level criteria.", + "type": "string" + }, + "basicProfile": { + "description": "Required. Profile which tells what the primitive action should be.", + "enum": [ + "BASIC_PROFILE_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "enumDescriptions": [ + "If there is not a mentioned action for the target.", + "Allow the matched traffic.", + "Deny the matched traffic." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. Time when the rule was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Free-text description of the resource.", + "type": "string" + }, + "enabled": { + "description": "Required. Whether the rule is enforced.", + "type": "boolean" + }, + "name": { + "description": "Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "type": "string" + }, + "priority": { + "description": "Required. Priority of the rule. Lower number corresponds to higher precedence.", + "format": "int32", + "type": "integer" + }, + "sessionMatcher": { + "description": "Required. CEL expression for matching on session criteria.", + "type": "string" + }, + "tlsInspectionEnabled": { + "description": "Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.", + "type": "boolean" + }, + "updateTime": { + "description": "Output only. Time when the rule was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudNetworksecurityV1CertificateProvider": { "description": "Specification of certificate provider. Defines the mechanism to obtain the certificate and private key for peer to peer authentication.", "id": "GoogleCloudNetworksecurityV1CertificateProvider", @@ -1445,6 +2173,56 @@ }, "type": "object" }, + "ListGatewaySecurityPoliciesResponse": { + "description": "Response returned by the ListGatewaySecurityPolicies method.", + "id": "ListGatewaySecurityPoliciesResponse", + "properties": { + "gatewaySecurityPolicies": { + "description": "List of GatewaySecurityPolicies resources.", + "items": { + "$ref": "GatewaySecurityPolicy" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then 'next_page_token' is included. To get the next set of results, call this method again using the value of 'next_page_token' as 'page_token'.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListGatewaySecurityPolicyRulesResponse": { + "description": "Response returned by the ListGatewaySecurityPolicyRules method.", + "id": "ListGatewaySecurityPolicyRulesResponse", + "properties": { + "gatewaySecurityPolicyRules": { + "description": "List of GatewaySecurityPolicyRule resources.", + "items": { + "$ref": "GatewaySecurityPolicyRule" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then 'next_page_token' is included. To get the next set of results, call this method again using the value of 'next_page_token' as 'page_token'.", + "type": "string" + }, + "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", @@ -1499,6 +2277,56 @@ }, "type": "object" }, + "ListTlsInspectionPoliciesResponse": { + "description": "Response returned by the ListTlsInspectionPolicies method.", + "id": "ListTlsInspectionPoliciesResponse", + "properties": { + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then 'next_page_token' is included. To get the next set of results, call this method again using the value of 'next_page_token' as 'page_token'.", + "type": "string" + }, + "tlsInspectionPolicies": { + "description": "List of TlsInspectionPolicies resources.", + "items": { + "$ref": "TlsInspectionPolicy" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListUrlListsResponse": { + "description": "Response returned by the ListUrlLists method.", + "id": "ListUrlListsResponse", + "properties": { + "nextPageToken": { + "description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + }, + "urlLists": { + "description": "List of UrlList resources.", + "items": { + "$ref": "UrlList" + }, + "type": "array" + } + }, + "type": "object" + }, "Location": { "description": "A resource that represents Google Cloud Platform location.", "id": "Location", @@ -1538,11 +2366,29 @@ "id": "MTLSPolicy", "properties": { "clientValidationCa": { - "description": " Defines the mechanism to obtain the Certificate Authority certificate to validate the client certificate.", + "description": "Required if the policy is to be used with Traffic Director. For External HTTPS LB it must be empty. Defines the mechanism to obtain the Certificate Authority certificate to validate the client certificate.", "items": { "$ref": "ValidationCA" }, "type": "array" + }, + "clientValidationMode": { + "description": "Specifies whether client connections proceed when a client presents an invalid certificate or no certificate. Required if the policy is to be used with the External HTTPS LB. For Traffic Director it must be empty.", + "enum": [ + "CLIENT_VALIDATION_MODE_UNSPECIFIED", + "ALLOW_INVALID_OR_MISSING_CLIENT_CERT", + "REJECT_INVALID" + ], + "enumDescriptions": [ + "Not allowed.", + "Allow connection even if certificate chain validation of the client certificate failed or no client certificate was presented. The proof of possession of the private key is always checked if client certificate was presented. This mode requires the backend to implement processing of data extracted from a client certificate to authenticate the peer, or to reject connections if the client certificate fingerprint is missing.", + "Require a client certificate and allow connection to the backend only if validation of the client certificate passed. If set, requires a reference to non-empty TrustConfig specified in `client_validation_trust_config`." + ], + "type": "string" + }, + "clientValidationTrustConfig": { + "description": "Reference to the TrustConfig from certificatemanager.googleapis.com namespace. If specified, the chain validation will be performed against certificates configured in the given TrustConfig. Allowed only if the policy is to be used with External HTTPS LB.", + "type": "string" } }, "type": "object" @@ -1648,11 +2494,11 @@ "type": "object" }, "ServerTlsPolicy": { - "description": "ServerTlsPolicy is a resource that specifies how a server should authenticate incoming requests. This resource itself does not affect configuration unless it is attached to a target HTTPS proxy or endpoint config selector resource.", + "description": "ServerTlsPolicy is a resource that specifies how a server should authenticate incoming requests. This resource itself does not affect configuration unless it is attached to a target HTTPS proxy or endpoint config selector resource. ServerTlsPolicy in the form accepted by External HTTPS Load Balancer can be attached only to TargetHttpsProxy with an `EXTERNAL` or `EXTERNAL_MANAGED` load balancing scheme. Traffic Director compatible ServerTlsPolicies can be attached to EndpointPolicy and TargetHttpsProxy with Traffic Director `INTERNAL_SELF_MANAGED` load balancing scheme.", "id": "ServerTlsPolicy", "properties": { "allowOpen": { - "description": " Determines if server allows plaintext connections. If set to true, server allows plain text connections. By default, it is set to false. This setting is not exclusive of other encryption modes. For example, if `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections. See documentation of other encryption modes to confirm compatibility. Consider using it if you wish to upgrade in place your deployment to TLS while having mixed TLS and non-TLS traffic reaching port :80.", + "description": "Can be enabled only for Traffic Director policies, must be false for External HTTPS LB policies. Determines if server allows plaintext connections. If set to true, server allows plain text connections. By default, it is set to false. This setting is not exclusive of other encryption modes. For example, if `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections. See documentation of other encryption modes to confirm compatibility. Consider using it if you wish to upgrade in place your deployment to TLS while having mixed TLS and non-TLS traffic reaching port :80.", "type": "boolean" }, "createTime": { @@ -1674,7 +2520,7 @@ }, "mtlsPolicy": { "$ref": "MTLSPolicy", - "description": " Defines a mechanism to provision peer validation certificates for peer to peer authentication (Mutual TLS - mTLS). If not specified, client certificate will not be requested. The connection is treated as TLS and not mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections." + "description": "Required if policy is to be used with the External HTTPS LB, for Traffic Director allowed to be empty. Defines a mechanism to provision peer validation certificates for peer to peer authentication (Mutual TLS - mTLS). If not specified, client certificate will not be requested. The connection is treated as TLS and not mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections." }, "name": { "description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", @@ -1682,7 +2528,7 @@ }, "serverCertificate": { "$ref": "GoogleCloudNetworksecurityV1CertificateProvider", - "description": " Defines a mechanism to provision server identity (public and private keys). Cannot be combined with `allow_open` as a permissive mode that allows both plain text and TLS is not supported." + "description": "Optional if policy is to be used with Traffic Director, for External HTTPS LB must be empty. Defines a mechanism to provision server identity (public and private keys). Cannot be combined with `allow_open` as a permissive mode that allows both plain text and TLS is not supported." }, "updateTime": { "description": "Output only. The timestamp when the resource was updated.", @@ -1741,6 +2587,71 @@ }, "type": "object" }, + "TlsInspectionPolicy": { + "description": "The TlsInspectionPolicy resource contains references to CA pools in Certificate Authority Service and associated metadata.", + "id": "TlsInspectionPolicy", + "properties": { + "caPool": { + "description": "Required. A CA pool resource used to issue interception certificates. The CA pool string has a relative resource path following the form \"projects/{project}/locations/{location}/caPools/{ca_pool}\".", + "type": "string" + }, + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Free-text description of the resource.", + "type": "string" + }, + "name": { + "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} tls_inspection_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "UrlList": { + "description": "UrlList proto helps users to set reusable, independently manageable lists of hosts, host patterns, URLs, URL patterns.", + "id": "UrlList", + "properties": { + "createTime": { + "description": "Output only. Time when the security policy was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Free-text description of the resource.", + "type": "string" + }, + "name": { + "description": "Required. Name of the resource provided by the user. Name is of the form projects/{project}/locations/{location}/urlLists/{url_list} url_list should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when the security policy was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "values": { + "description": "Required. FQDNs and URLs.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ValidationCA": { "description": "Specification of ValidationCA. Defines the mechanism to obtain the Certificate Authority certificate to validate the peer certificate.", "id": "ValidationCA", diff --git a/networksecurity/v1/networksecurity-gen.go b/networksecurity/v1/networksecurity-gen.go index 99ccdb27a06..3cfa0a74e14 100644 --- a/networksecurity/v1/networksecurity-gen.go +++ b/networksecurity/v1/networksecurity-gen.go @@ -154,8 +154,11 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.AuthorizationPolicies = NewProjectsLocationsAuthorizationPoliciesService(s) rs.ClientTlsPolicies = NewProjectsLocationsClientTlsPoliciesService(s) + rs.GatewaySecurityPolicies = NewProjectsLocationsGatewaySecurityPoliciesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.ServerTlsPolicies = NewProjectsLocationsServerTlsPoliciesService(s) + rs.TlsInspectionPolicies = NewProjectsLocationsTlsInspectionPoliciesService(s) + rs.UrlLists = NewProjectsLocationsUrlListsService(s) return rs } @@ -166,9 +169,15 @@ type ProjectsLocationsService struct { ClientTlsPolicies *ProjectsLocationsClientTlsPoliciesService + GatewaySecurityPolicies *ProjectsLocationsGatewaySecurityPoliciesService + Operations *ProjectsLocationsOperationsService ServerTlsPolicies *ProjectsLocationsServerTlsPoliciesService + + TlsInspectionPolicies *ProjectsLocationsTlsInspectionPoliciesService + + UrlLists *ProjectsLocationsUrlListsService } func NewProjectsLocationsAuthorizationPoliciesService(s *Service) *ProjectsLocationsAuthorizationPoliciesService { @@ -189,6 +198,27 @@ type ProjectsLocationsClientTlsPoliciesService struct { s *Service } +func NewProjectsLocationsGatewaySecurityPoliciesService(s *Service) *ProjectsLocationsGatewaySecurityPoliciesService { + rs := &ProjectsLocationsGatewaySecurityPoliciesService{s: s} + rs.Rules = NewProjectsLocationsGatewaySecurityPoliciesRulesService(s) + return rs +} + +type ProjectsLocationsGatewaySecurityPoliciesService struct { + s *Service + + Rules *ProjectsLocationsGatewaySecurityPoliciesRulesService +} + +func NewProjectsLocationsGatewaySecurityPoliciesRulesService(s *Service) *ProjectsLocationsGatewaySecurityPoliciesRulesService { + rs := &ProjectsLocationsGatewaySecurityPoliciesRulesService{s: s} + return rs +} + +type ProjectsLocationsGatewaySecurityPoliciesRulesService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -207,6 +237,24 @@ type ProjectsLocationsServerTlsPoliciesService struct { s *Service } +func NewProjectsLocationsTlsInspectionPoliciesService(s *Service) *ProjectsLocationsTlsInspectionPoliciesService { + rs := &ProjectsLocationsTlsInspectionPoliciesService{s: s} + return rs +} + +type ProjectsLocationsTlsInspectionPoliciesService struct { + s *Service +} + +func NewProjectsLocationsUrlListsService(s *Service) *ProjectsLocationsUrlListsService { + rs := &ProjectsLocationsUrlListsService{s: s} + return rs +} + +type ProjectsLocationsUrlListsService struct { + s *Service +} + // AuthorizationPolicy: AuthorizationPolicy is a resource that specifies // how a server should authorize incoming connections. This resource in // itself does not change the configuration unless it's attached to a @@ -499,6 +547,134 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GatewaySecurityPolicy: The GatewaySecurityPolicy resource contains a +// collection of GatewaySecurityPolicyRules and associated metadata. +type GatewaySecurityPolicy struct { + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Free-text description of the resource. + Description string `json:"description,omitempty"` + + // Name: Required. Name of the resource. Name is of the form + // projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatew + // ay_security_policy} gateway_security_policy should match the + // pattern:(^a-z ([a-z0-9-]{0,61}[a-z0-9])?$). + Name string `json:"name,omitempty"` + + // TlsInspectionPolicy: Optional. Name of a TLS Inspection Policy + // resource that defines how TLS inspection will be performed for any + // rule(s) which enables it. + TlsInspectionPolicy string `json:"tlsInspectionPolicy,omitempty"` + + // UpdateTime: Output only. The timestamp when the resource was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GatewaySecurityPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GatewaySecurityPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GatewaySecurityPolicyRule: The GatewaySecurityPolicyRule resource is +// in a nested collection within a GatewaySecurityPolicy and represents +// a traffic matching condition and associated action to perform. +type GatewaySecurityPolicyRule struct { + // ApplicationMatcher: Optional. CEL expression for matching on + // L7/application level criteria. + ApplicationMatcher string `json:"applicationMatcher,omitempty"` + + // BasicProfile: Required. Profile which tells what the primitive action + // should be. + // + // Possible values: + // "BASIC_PROFILE_UNSPECIFIED" - If there is not a mentioned action + // for the target. + // "ALLOW" - Allow the matched traffic. + // "DENY" - Deny the matched traffic. + BasicProfile string `json:"basicProfile,omitempty"` + + // CreateTime: Output only. Time when the rule was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Free-text description of the resource. + Description string `json:"description,omitempty"` + + // Enabled: Required. Whether the rule is enforced. + Enabled bool `json:"enabled,omitempty"` + + // Name: Required. Immutable. Name of the resource. ame is the full + // resource name so + // projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatew + // ay_security_policy}/rules/{rule} rule should match the pattern: (^a-z + // ([a-z0-9-]{0,61}[a-z0-9])?$). + Name string `json:"name,omitempty"` + + // Priority: Required. Priority of the rule. Lower number corresponds to + // higher precedence. + Priority int64 `json:"priority,omitempty"` + + // SessionMatcher: Required. CEL expression for matching on session + // criteria. + SessionMatcher string `json:"sessionMatcher,omitempty"` + + // TlsInspectionEnabled: Optional. Flag to enable TLS inspection of + // traffic matching on , can only be true if the parent + // GatewaySecurityPolicy references a TLSInspectionConfig. + TlsInspectionEnabled bool `json:"tlsInspectionEnabled,omitempty"` + + // UpdateTime: Output only. Time when the rule was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ApplicationMatcher") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApplicationMatcher") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GatewaySecurityPolicyRule) MarshalJSON() ([]byte, error) { + type NoMethod GatewaySecurityPolicyRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudNetworksecurityV1CertificateProvider: Specification of // certificate provider. Defines the mechanism to obtain the certificate // and private key for peer to peer authentication. @@ -1077,6 +1253,95 @@ func (s *ListClientTlsPoliciesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListGatewaySecurityPoliciesResponse: Response returned by the +// ListGatewaySecurityPolicies method. +type ListGatewaySecurityPoliciesResponse struct { + // GatewaySecurityPolicies: List of GatewaySecurityPolicies resources. + GatewaySecurityPolicies []*GatewaySecurityPolicy `json:"gatewaySecurityPolicies,omitempty"` + + // NextPageToken: If there might be more results than those appearing in + // this response, then 'next_page_token' is included. To get the next + // set of results, call this method again using the value of + // 'next_page_token' as 'page_token'. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "GatewaySecurityPolicies") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GatewaySecurityPolicies") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListGatewaySecurityPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListGatewaySecurityPoliciesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListGatewaySecurityPolicyRulesResponse: Response returned by the +// ListGatewaySecurityPolicyRules method. +type ListGatewaySecurityPolicyRulesResponse struct { + // GatewaySecurityPolicyRules: List of GatewaySecurityPolicyRule + // resources. + GatewaySecurityPolicyRules []*GatewaySecurityPolicyRule `json:"gatewaySecurityPolicyRules,omitempty"` + + // NextPageToken: If there might be more results than those appearing in + // this response, then 'next_page_token' is included. To get the next + // set of results, call this method again using the value of + // 'next_page_token' as 'page_token'. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "GatewaySecurityPolicyRules") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "GatewaySecurityPolicyRules") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListGatewaySecurityPolicyRulesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListGatewaySecurityPolicyRulesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for // Locations.ListLocations. type ListLocationsResponse struct { @@ -1190,6 +1455,89 @@ func (s *ListServerTlsPoliciesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListTlsInspectionPoliciesResponse: Response returned by the +// ListTlsInspectionPolicies method. +type ListTlsInspectionPoliciesResponse struct { + // NextPageToken: If there might be more results than those appearing in + // this response, then 'next_page_token' is included. To get the next + // set of results, call this method again using the value of + // 'next_page_token' as 'page_token'. + NextPageToken string `json:"nextPageToken,omitempty"` + + // TlsInspectionPolicies: List of TlsInspectionPolicies resources. + TlsInspectionPolicies []*TlsInspectionPolicy `json:"tlsInspectionPolicies,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListTlsInspectionPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListTlsInspectionPoliciesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListUrlListsResponse: Response returned by the ListUrlLists method. +type ListUrlListsResponse struct { + // NextPageToken: If there might be more results than those appearing in + // this response, then `next_page_token` is included. To get the next + // set of results, call this method again using the value of + // `next_page_token` as `page_token`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // UrlLists: List of UrlList resources. + UrlLists []*UrlList `json:"urlLists,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListUrlListsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListUrlListsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Location: A resource that represents Google Cloud Platform location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby @@ -1242,10 +1590,39 @@ func (s *Location) MarshalJSON() ([]byte, error) { // MTLSPolicy: Specification of the MTLSPolicy. type MTLSPolicy struct { - // ClientValidationCa: Defines the mechanism to obtain the Certificate - // Authority certificate to validate the client certificate. + // ClientValidationCa: Required if the policy is to be used with Traffic + // Director. For External HTTPS LB it must be empty. Defines the + // mechanism to obtain the Certificate Authority certificate to validate + // the client certificate. ClientValidationCa []*ValidationCA `json:"clientValidationCa,omitempty"` + // ClientValidationMode: Specifies whether client connections proceed + // when a client presents an invalid certificate or no certificate. + // Required if the policy is to be used with the External HTTPS LB. For + // Traffic Director it must be empty. + // + // Possible values: + // "CLIENT_VALIDATION_MODE_UNSPECIFIED" - Not allowed. + // "ALLOW_INVALID_OR_MISSING_CLIENT_CERT" - Allow connection even if + // certificate chain validation of the client certificate failed or no + // client certificate was presented. The proof of possession of the + // private key is always checked if client certificate was presented. + // This mode requires the backend to implement processing of data + // extracted from a client certificate to authenticate the peer, or to + // reject connections if the client certificate fingerprint is missing. + // "REJECT_INVALID" - Require a client certificate and allow + // connection to the backend only if validation of the client + // certificate passed. If set, requires a reference to non-empty + // TrustConfig specified in `client_validation_trust_config`. + ClientValidationMode string `json:"clientValidationMode,omitempty"` + + // ClientValidationTrustConfig: Reference to the TrustConfig from + // certificatemanager.googleapis.com namespace. If specified, the chain + // validation will be performed against certificates configured in the + // given TrustConfig. Allowed only if the policy is to be used with + // External HTTPS LB. + ClientValidationTrustConfig string `json:"clientValidationTrustConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClientValidationCa") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1425,16 +1802,23 @@ func (s *Rule) MarshalJSON() ([]byte, error) { // ServerTlsPolicy: ServerTlsPolicy is a resource that specifies how a // server should authenticate incoming requests. This resource itself // does not affect configuration unless it is attached to a target HTTPS -// proxy or endpoint config selector resource. +// proxy or endpoint config selector resource. ServerTlsPolicy in the +// form accepted by External HTTPS Load Balancer can be attached only to +// TargetHttpsProxy with an `EXTERNAL` or `EXTERNAL_MANAGED` load +// balancing scheme. Traffic Director compatible ServerTlsPolicies can +// be attached to EndpointPolicy and TargetHttpsProxy with Traffic +// Director `INTERNAL_SELF_MANAGED` load balancing scheme. type ServerTlsPolicy struct { - // AllowOpen: Determines if server allows plaintext connections. If set - // to true, server allows plain text connections. By default, it is set - // to false. This setting is not exclusive of other encryption modes. - // For example, if `allow_open` and `mtls_policy` are set, server allows - // both plain text and mTLS connections. See documentation of other - // encryption modes to confirm compatibility. Consider using it if you - // wish to upgrade in place your deployment to TLS while having mixed - // TLS and non-TLS traffic reaching port :80. + // AllowOpen: Can be enabled only for Traffic Director policies, must be + // false for External HTTPS LB policies. Determines if server allows + // plaintext connections. If set to true, server allows plain text + // connections. By default, it is set to false. This setting is not + // exclusive of other encryption modes. For example, if `allow_open` and + // `mtls_policy` are set, server allows both plain text and mTLS + // connections. See documentation of other encryption modes to confirm + // compatibility. Consider using it if you wish to upgrade in place your + // deployment to TLS while having mixed TLS and non-TLS traffic reaching + // port :80. AllowOpen bool `json:"allowOpen,omitempty"` // CreateTime: Output only. The timestamp when the resource was created. @@ -1446,12 +1830,13 @@ type ServerTlsPolicy struct { // Labels: Set of label tags associated with the resource. Labels map[string]string `json:"labels,omitempty"` - // MtlsPolicy: Defines a mechanism to provision peer validation - // certificates for peer to peer authentication (Mutual TLS - mTLS). If - // not specified, client certificate will not be requested. The - // connection is treated as TLS and not mTLS. If `allow_open` and - // `mtls_policy` are set, server allows both plain text and mTLS - // connections. + // MtlsPolicy: Required if policy is to be used with the External HTTPS + // LB, for Traffic Director allowed to be empty. Defines a mechanism to + // provision peer validation certificates for peer to peer + // authentication (Mutual TLS - mTLS). If not specified, client + // certificate will not be requested. The connection is treated as TLS + // and not mTLS. If `allow_open` and `mtls_policy` are set, server + // allows both plain text and mTLS connections. MtlsPolicy *MTLSPolicy `json:"mtlsPolicy,omitempty"` // Name: Required. Name of the ServerTlsPolicy resource. It matches the @@ -1460,9 +1845,11 @@ type ServerTlsPolicy struct { // ` Name string `json:"name,omitempty"` - // ServerCertificate: Defines a mechanism to provision server identity - // (public and private keys). Cannot be combined with `allow_open` as a - // permissive mode that allows both plain text and TLS is not supported. + // ServerCertificate: Optional if policy is to be used with Traffic + // Director, for External HTTPS LB must be empty. Defines a mechanism to + // provision server identity (public and private keys). Cannot be + // combined with `allow_open` as a permissive mode that allows both + // plain text and TLS is not supported. ServerCertificate *GoogleCloudNetworksecurityV1CertificateProvider `json:"serverCertificate,omitempty"` // UpdateTime: Output only. The timestamp when the resource was updated. @@ -1580,29 +1967,128 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ValidationCA: Specification of ValidationCA. Defines the mechanism to -// obtain the Certificate Authority certificate to validate the peer -// certificate. -type ValidationCA struct { - // CertificateProviderInstance: The certificate provider instance - // specification that will be passed to the data plane, which will be - // used to load necessary credential information. - CertificateProviderInstance *CertificateProviderInstance `json:"certificateProviderInstance,omitempty"` +// TlsInspectionPolicy: The TlsInspectionPolicy resource contains +// references to CA pools in Certificate Authority Service and +// associated metadata. +type TlsInspectionPolicy struct { + // CaPool: Required. A CA pool resource used to issue interception + // certificates. The CA pool string has a relative resource path + // following the form + // "projects/{project}/locations/{location}/caPools/{ca_pool}". + CaPool string `json:"caPool,omitempty"` - // GrpcEndpoint: gRPC specific configuration to access the gRPC server - // to obtain the CA certificate. - GrpcEndpoint *GoogleCloudNetworksecurityV1GrpcEndpoint `json:"grpcEndpoint,omitempty"` + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "CertificateProviderInstance") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` + // Description: Optional. Free-text description of the resource. + Description string `json:"description,omitempty"` - // NullFields is a list of field names (e.g. + // Name: Required. Name of the resource. Name is of the form + // projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_ins + // pection_policy} tls_inspection_policy should match the pattern:(^a-z + // ([a-z0-9-]{0,61}[a-z0-9])?$). + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when the resource was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CaPool") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CaPool") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TlsInspectionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod TlsInspectionPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UrlList: UrlList proto helps users to set reusable, independently +// manageable lists of hosts, host patterns, URLs, URL patterns. +type UrlList struct { + // CreateTime: Output only. Time when the security policy was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Free-text description of the resource. + Description string `json:"description,omitempty"` + + // Name: Required. Name of the resource provided by the user. Name is of + // the form projects/{project}/locations/{location}/urlLists/{url_list} + // url_list should match the pattern:(^a-z ([a-z0-9-]{0,61}[a-z0-9])?$). + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. Time when the security policy was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // Values: Required. FQDNs and URLs. + Values []string `json:"values,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlList) MarshalJSON() ([]byte, error) { + type NoMethod UrlList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ValidationCA: Specification of ValidationCA. Defines the mechanism to +// obtain the Certificate Authority certificate to validate the peer +// certificate. +type ValidationCA struct { + // CertificateProviderInstance: The certificate provider instance + // specification that will be passed to the data plane, which will be + // used to load necessary credential information. + CertificateProviderInstance *CertificateProviderInstance `json:"certificateProviderInstance,omitempty"` + + // GrpcEndpoint: gRPC specific configuration to access the gRPC server + // to obtain the CA certificate. + GrpcEndpoint *GoogleCloudNetworksecurityV1GrpcEndpoint `json:"grpcEndpoint,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CertificateProviderInstance") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. // "CertificateProviderInstance") to include in API requests with the // JSON null value. By default, fields with empty values are omitted // from API requests. However, any field with an empty value appearing @@ -4513,40 +4999,44 @@ func (c *ProjectsLocationsClientTlsPoliciesTestIamPermissionsCall) Do(opts ...go } -// method id "networksecurity.projects.locations.operations.cancel": +// method id "networksecurity.projects.locations.gatewaySecurityPolicies.create": -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGatewaySecurityPoliciesCreateCall struct { + s *Service + parent string + gatewaysecuritypolicy *GatewaySecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// Create: Creates a new GatewaySecurityPolicy in a given project and +// location. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest +// - parent: The parent resource of the GatewaySecurityPolicy. Must be +// in the format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Create(parent string, gatewaysecuritypolicy *GatewaySecurityPolicy) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { + c := &ProjectsLocationsGatewaySecurityPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.gatewaysecuritypolicy = gatewaysecuritypolicy + return c +} + +// GatewaySecurityPolicyId sets the optional parameter +// "gatewaySecurityPolicyId": Required. Short name of the +// GatewaySecurityPolicy resource to be created. This value should be +// 1-63 characters long, containing only letters, numbers, hyphens, and +// underscores, and should not start with a number. E.g. +// "gateway_security_policy1". +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) GatewaySecurityPolicyId(gatewaySecurityPolicyId string) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { + c.urlParams_.Set("gatewaySecurityPolicyId", gatewaySecurityPolicyId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4554,21 +5044,21 @@ func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4576,14 +5066,14 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicy) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gatewaySecurityPolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4591,19 +5081,19 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4622,7 +5112,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4634,28 +5124,33 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "description": "Creates a new GatewaySecurityPolicy in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies", // "httpMethod": "POST", - // "id": "networksecurity.projects.locations.operations.cancel", + // "id": "networksecurity.projects.locations.gatewaySecurityPolicies.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "gatewaySecurityPolicyId": { + // "description": "Required. Short name of the GatewaySecurityPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"gateway_security_policy1\".", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the GatewaySecurityPolicy. Must be in the format `projects/{project}/locations/{location}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:cancel", + // "path": "v1/{+parent}/gatewaySecurityPolicies", // "request": { - // "$ref": "CancelOperationRequest" + // "$ref": "GatewaySecurityPolicy" // }, // "response": { - // "$ref": "Empty" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4664,9 +5159,9 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } -// method id "networksecurity.projects.locations.operations.delete": +// method id "networksecurity.projects.locations.gatewaySecurityPolicies.delete": -type ProjectsLocationsOperationsDeleteCall struct { +type ProjectsLocationsGatewaySecurityPoliciesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4674,14 +5169,13 @@ type ProjectsLocationsOperationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. +// Delete: Deletes a single GatewaySecurityPolicy. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: A name of the GatewaySecurityPolicy to delete. Must be in the +// format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Delete(name string) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { + c := &ProjectsLocationsGatewaySecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4689,7 +5183,7 @@ func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4697,21 +5191,21 @@ func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4734,14 +5228,14 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4760,7 +5254,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4772,25 +5266,25 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Deletes a single GatewaySecurityPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", // "httpMethod": "DELETE", - // "id": "networksecurity.projects.locations.operations.delete", + // "id": "networksecurity.projects.locations.gatewaySecurityPolicies.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be deleted.", + // "description": "Required. A name of the GatewaySecurityPolicy to delete. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Empty" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4799,9 +5293,9 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "networksecurity.projects.locations.operations.get": +// method id "networksecurity.projects.locations.gatewaySecurityPolicies.get": -type ProjectsLocationsOperationsGetCall struct { +type ProjectsLocationsGatewaySecurityPoliciesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4810,13 +5304,13 @@ type ProjectsLocationsOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets details of a single GatewaySecurityPolicy. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: A name of the GatewaySecurityPolicy to get. Must be in the +// format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Get(name string) *ProjectsLocationsGatewaySecurityPoliciesGetCall { + c := &ProjectsLocationsGatewaySecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4824,7 +5318,7 @@ func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocations // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4834,7 +5328,7 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -4842,21 +5336,21 @@ func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4882,14 +5376,14 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.get" call. +// Exactly one of *GatewaySecurityPolicy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GatewaySecurityPolicy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*GatewaySecurityPolicy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4908,7 +5402,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &GatewaySecurityPolicy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4920,25 +5414,25 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Gets details of a single GatewaySecurityPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", // "httpMethod": "GET", - // "id": "networksecurity.projects.locations.operations.get", + // "id": "networksecurity.projects.locations.gatewaySecurityPolicies.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. A name of the GatewaySecurityPolicy to get. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Operation" + // "$ref": "GatewaySecurityPolicy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4947,45 +5441,40 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "networksecurity.projects.locations.operations.list": +// method id "networksecurity.projects.locations.gatewaySecurityPolicies.list": -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsGatewaySecurityPoliciesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists GatewaySecurityPolicies in a given project and location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The project and location from which the +// GatewaySecurityPolicies should be listed, specified in the format +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) List(parent string) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c := &ProjectsLocationsGatewaySecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of +// GatewaySecurityPolicies to return per call. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaySecurityPoliciesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { +// PageToken sets the optional parameter "pageToken": The value returned +// by the last 'ListGatewaySecurityPoliciesResponse' Indicates that this +// is a continuation of a prior 'ListGatewaySecurityPolicies' call, and +// that the system should return the next page of data. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsGatewaySecurityPoliciesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -4993,7 +5482,7 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5003,7 +5492,7 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesListCall { c.ifNoneMatch_ = entityTag return c } @@ -5011,21 +5500,21 @@ func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5038,7 +5527,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gatewaySecurityPolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5046,19 +5535,20 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.list" call. +// Exactly one of *ListGatewaySecurityPoliciesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListGatewaySecurityPoliciesResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListGatewaySecurityPoliciesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5077,7 +5567,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &ListGatewaySecurityPoliciesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5089,41 +5579,36 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "description": "Lists GatewaySecurityPolicies in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies", // "httpMethod": "GET", - // "id": "networksecurity.projects.locations.operations.list", + // "id": "networksecurity.projects.locations.gatewaySecurityPolicies.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "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.", + // "description": "Maximum number of GatewaySecurityPolicies to return per call.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "The value returned by the last 'ListGatewaySecurityPoliciesResponse' Indicates that this is a continuation of a prior 'ListGatewaySecurityPolicies' call, and that the system should return the next page of data.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the GatewaySecurityPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}/operations", + // "path": "v1/{+parent}/gatewaySecurityPolicies", // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "ListGatewaySecurityPoliciesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5135,7 +5620,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Pages(ctx context.Context, f func(*ListGatewaySecurityPoliciesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -5153,43 +5638,45 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } -// method id "networksecurity.projects.locations.serverTlsPolicies.create": +// method id "networksecurity.projects.locations.gatewaySecurityPolicies.patch": -type ProjectsLocationsServerTlsPoliciesCreateCall struct { - s *Service - parent string - servertlspolicy *ServerTlsPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGatewaySecurityPoliciesPatchCall struct { + s *Service + name string + gatewaysecuritypolicy *GatewaySecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new ServerTlsPolicy in a given project and -// location. +// Patch: Updates the parameters of a single GatewaySecurityPolicy. // -// - parent: The parent resource of the ServerTlsPolicy. Must be in the -// format `projects/*/locations/{location}`. -func (r *ProjectsLocationsServerTlsPoliciesService) Create(parent string, servertlspolicy *ServerTlsPolicy) *ProjectsLocationsServerTlsPoliciesCreateCall { - c := &ProjectsLocationsServerTlsPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.servertlspolicy = servertlspolicy +// - name: Name of the resource. Name is of the form +// projects/{project}/locations/{location}/gatewaySecurityPolicies/{gat +// eway_security_policy} gateway_security_policy should match the +// pattern:(^a-z ([a-z0-9-]{0,61}[a-z0-9])?$). +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Patch(name string, gatewaysecuritypolicy *GatewaySecurityPolicy) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { + c := &ProjectsLocationsGatewaySecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.gatewaysecuritypolicy = gatewaysecuritypolicy return c } -// ServerTlsPolicyId sets the optional parameter "serverTlsPolicyId": -// Required. Short name of the ServerTlsPolicy resource to be created. -// This value should be 1-63 characters long, containing only letters, -// numbers, hyphens, and underscores, and should not start with a -// number. E.g. "server_mtls_policy". -func (c *ProjectsLocationsServerTlsPoliciesCreateCall) ServerTlsPolicyId(serverTlsPolicyId string) *ProjectsLocationsServerTlsPoliciesCreateCall { - c.urlParams_.Set("serverTlsPolicyId", serverTlsPolicyId) +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the +// GatewaySecurityPolicy resource by the update. The fields specified in +// the update_mask are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServerTlsPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesCreateCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5197,21 +5684,21 @@ func (c *ProjectsLocationsServerTlsPoliciesCreateCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServerTlsPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesCreateCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServerTlsPoliciesCreateCall) Header() http.Header { +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServerTlsPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5219,34 +5706,34 @@ func (c *ProjectsLocationsServerTlsPoliciesCreateCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.servertlspolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicy) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serverTlsPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.serverTlsPolicies.create" call. +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsServerTlsPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5277,30 +5764,31 @@ func (c *ProjectsLocationsServerTlsPoliciesCreateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Creates a new ServerTlsPolicy in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", - // "httpMethod": "POST", - // "id": "networksecurity.projects.locations.serverTlsPolicies.create", + // "description": "Updates the parameters of a single GatewaySecurityPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", + // "httpMethod": "PATCH", + // "id": "networksecurity.projects.locations.gatewaySecurityPolicies.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource of the ServerTlsPolicy. Must be in the format `projects/*/locations/{location}`.", + // "name": { + // "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} gateway_security_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", // "required": true, // "type": "string" // }, - // "serverTlsPolicyId": { - // "description": "Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"server_mtls_policy\".", + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the GatewaySecurityPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/serverTlsPolicies", + // "path": "v1/{+name}", // "request": { - // "$ref": "ServerTlsPolicy" + // "$ref": "GatewaySecurityPolicy" // }, // "response": { // "$ref": "Operation" @@ -5312,30 +5800,42 @@ func (c *ProjectsLocationsServerTlsPoliciesCreateCall) Do(opts ...googleapi.Call } -// method id "networksecurity.projects.locations.serverTlsPolicies.delete": +// method id "networksecurity.projects.locations.gatewaySecurityPolicies.rules.create": -type ProjectsLocationsServerTlsPoliciesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall struct { + s *Service + parent string + gatewaysecuritypolicyrule *GatewaySecurityPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single ServerTlsPolicy. +// Create: Creates a new GatewaySecurityPolicy in a given project and +// location. // -// - name: A name of the ServerTlsPolicy to delete. Must be in the -// format `projects/*/locations/{location}/serverTlsPolicies/*`. -func (r *ProjectsLocationsServerTlsPoliciesService) Delete(name string) *ProjectsLocationsServerTlsPoliciesDeleteCall { - c := &ProjectsLocationsServerTlsPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent where this rule will be created. Format : +// projects/{project}/location/{location}/gatewaySecurityPolicies/*. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Create(parent string, gatewaysecuritypolicyrule *GatewaySecurityPolicyRule) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.gatewaysecuritypolicyrule = gatewaysecuritypolicyrule + return c +} + +// GatewaySecurityPolicyRuleId sets the optional parameter +// "gatewaySecurityPolicyRuleId": The ID to use for the rule, which will +// become the final component of the rule's resource name. This value +// should be 4-63 characters, and valid characters are /a-z-/. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) GatewaySecurityPolicyRuleId(gatewaySecurityPolicyRuleId string) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { + c.urlParams_.Set("gatewaySecurityPolicyRuleId", gatewaySecurityPolicyRuleId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesDeleteCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5343,21 +5843,21 @@ func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesDeleteCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5365,29 +5865,34 @@ func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicyrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.serverTlsPolicies.delete" call. +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.create" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5418,23 +5923,31 @@ func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Deletes a single ServerTlsPolicy.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", - // "httpMethod": "DELETE", - // "id": "networksecurity.projects.locations.serverTlsPolicies.delete", + // "description": "Creates a new GatewaySecurityPolicy in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. A name of the ServerTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + // "gatewaySecurityPolicyRuleId": { + // "description": "The ID to use for the rule, which will become the final component of the rule's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent where this rule will be created. Format : projects/{project}/location/{location}/gatewaySecurityPolicies/*", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/rules", + // "request": { + // "$ref": "GatewaySecurityPolicyRule" + // }, // "response": { // "$ref": "Operation" // }, @@ -5445,23 +5958,24 @@ func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) Do(opts ...googleapi.Call } -// method id "networksecurity.projects.locations.serverTlsPolicies.get": +// method id "networksecurity.projects.locations.gatewaySecurityPolicies.rules.delete": -type ProjectsLocationsServerTlsPoliciesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single ServerTlsPolicy. +// Delete: Deletes a single GatewaySecurityPolicyRule. // -// - name: A name of the ServerTlsPolicy to get. Must be in the format -// `projects/*/locations/{location}/serverTlsPolicies/*`. -func (r *ProjectsLocationsServerTlsPoliciesService) Get(name string) *ProjectsLocationsServerTlsPoliciesGetCall { - c := &ProjectsLocationsServerTlsPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: A name of the GatewaySecurityPolicyRule to delete. Must be in +// the format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/{ga +// tewaySecurityPolicy}/rules/*`. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Delete(name string) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -5469,54 +5983,41 @@ func (r *ProjectsLocationsServerTlsPoliciesService) Get(name string) *ProjectsLo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServerTlsPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesGetCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServerTlsPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServerTlsPoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServerTlsPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesGetCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServerTlsPoliciesGetCall) Header() http.Header { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServerTlsPoliciesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -5527,14 +6028,14 @@ func (c *ProjectsLocationsServerTlsPoliciesGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.serverTlsPolicies.get" call. -// Exactly one of *ServerTlsPolicy or error will be non-nil. Any non-2xx +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *ServerTlsPolicy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsServerTlsPoliciesGetCall) Do(opts ...googleapi.CallOption) (*ServerTlsPolicy, error) { +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5553,7 +6054,7 @@ func (c *ProjectsLocationsServerTlsPoliciesGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ServerTlsPolicy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5565,25 +6066,25 @@ func (c *ProjectsLocationsServerTlsPoliciesGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets details of a single ServerTlsPolicy.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", - // "httpMethod": "GET", - // "id": "networksecurity.projects.locations.serverTlsPolicies.get", + // "description": "Deletes a single GatewaySecurityPolicyRule.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", + // "httpMethod": "DELETE", + // "id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. A name of the ServerTlsPolicy to get. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + // "description": "Required. A name of the GatewaySecurityPolicyRule to delete. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}/rules/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "ServerTlsPolicy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5592,53 +6093,33 @@ func (c *ProjectsLocationsServerTlsPoliciesGetCall) Do(opts ...googleapi.CallOpt } -// method id "networksecurity.projects.locations.serverTlsPolicies.getIamPolicy": +// method id "networksecurity.projects.locations.gatewaySecurityPolicies.rules.get": -type ProjectsLocationsServerTlsPoliciesGetIamPolicyCall struct { +type ProjectsLocationsGatewaySecurityPoliciesRulesGetCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// Get: Gets details of a single GatewaySecurityPolicyRule. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsServerTlsPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall { - c := &ProjectsLocationsServerTlsPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name of the GatewaySecurityPolicyRule to retrieve. +// Format: +// projects/{project}/location/{location}/gatewaySecurityPolicies/*/rul +// es/*. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Get(name string) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5648,7 +6129,7 @@ func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Fields(s ...googlea // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -5656,21 +6137,21 @@ func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) IfNoneMatch(entityT // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5683,7 +6164,7 @@ func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) doRequest(alt strin var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5691,19 +6172,19 @@ func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) doRequest(alt strin } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.serverTlsPolicies.getIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.get" call. +// Exactly one of *GatewaySecurityPolicyRule or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GatewaySecurityPolicyRule.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Do(opts ...googleapi.CallOption) (*GatewaySecurityPolicyRule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5722,7 +6203,7 @@ func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GatewaySecurityPolicyRule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5734,31 +6215,25 @@ func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Do(opts ...googleap } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:getIamPolicy", + // "description": "Gets details of a single GatewaySecurityPolicyRule.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", // "httpMethod": "GET", - // "id": "networksecurity.projects.locations.serverTlsPolicies.getIamPolicy", + // "id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The name of the GatewaySecurityPolicyRule to retrieve. Format: projects/{project}/location/{location}/gatewaySecurityPolicies/*/rules/*", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GatewaySecurityPolicyRule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5767,9 +6242,9 @@ func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Do(opts ...googleap } -// method id "networksecurity.projects.locations.serverTlsPolicies.list": +// method id "networksecurity.projects.locations.gatewaySecurityPolicies.rules.list": -type ProjectsLocationsServerTlsPoliciesListCall struct { +type ProjectsLocationsGatewaySecurityPoliciesRulesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -5778,29 +6253,32 @@ type ProjectsLocationsServerTlsPoliciesListCall struct { header_ http.Header } -// List: Lists ServerTlsPolicies in a given project and location. +// List: Lists GatewaySecurityPolicyRules in a given project and +// location. // -// - parent: The project and location from which the ServerTlsPolicies -// should be listed, specified in the format -// `projects/*/locations/{location}`. -func (r *ProjectsLocationsServerTlsPoliciesService) List(parent string) *ProjectsLocationsServerTlsPoliciesListCall { - c := &ProjectsLocationsServerTlsPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The project, location and GatewaySecurityPolicy from which +// the GatewaySecurityPolicyRules should be listed, specified in the +// format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/{ga +// tewaySecurityPolicy}`. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) List(parent string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// ServerTlsPolicies to return per call. -func (c *ProjectsLocationsServerTlsPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsServerTlsPoliciesListCall { +// GatewaySecurityPolicyRules to return per call. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListServerTlsPoliciesResponse` Indicates that this is a -// continuation of a prior `ListServerTlsPolicies` call, and that the -// system should return the next page of data. -func (c *ProjectsLocationsServerTlsPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsServerTlsPoliciesListCall { +// by the last 'ListGatewaySecurityPolicyRulesResponse' Indicates that +// this is a continuation of a prior 'ListGatewaySecurityPolicyRules' +// call, and that the system should return the next page of data. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageToken(pageToken string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -5808,7 +6286,7 @@ func (c *ProjectsLocationsServerTlsPoliciesListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServerTlsPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesListCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5818,7 +6296,7 @@ func (c *ProjectsLocationsServerTlsPoliciesListCall) Fields(s ...googleapi.Field // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsServerTlsPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServerTlsPoliciesListCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { c.ifNoneMatch_ = entityTag return c } @@ -5826,21 +6304,21 @@ func (c *ProjectsLocationsServerTlsPoliciesListCall) IfNoneMatch(entityTag strin // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServerTlsPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesListCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServerTlsPoliciesListCall) Header() http.Header { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServerTlsPoliciesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5853,7 +6331,7 @@ func (c *ProjectsLocationsServerTlsPoliciesListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serverTlsPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5866,14 +6344,15 @@ func (c *ProjectsLocationsServerTlsPoliciesListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.serverTlsPolicies.list" call. -// Exactly one of *ListServerTlsPoliciesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListServerTlsPoliciesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.list" call. +// Exactly one of *ListGatewaySecurityPolicyRulesResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *ListGatewaySecurityPolicyRulesResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServerTlsPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListServerTlsPoliciesResponse, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Do(opts ...googleapi.CallOption) (*ListGatewaySecurityPolicyRulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5892,7 +6371,7 @@ func (c *ProjectsLocationsServerTlsPoliciesListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListServerTlsPoliciesResponse{ + ret := &ListGatewaySecurityPolicyRulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5904,36 +6383,36 @@ func (c *ProjectsLocationsServerTlsPoliciesListCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Lists ServerTlsPolicies in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", + // "description": "Lists GatewaySecurityPolicyRules in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules", // "httpMethod": "GET", - // "id": "networksecurity.projects.locations.serverTlsPolicies.list", + // "id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of ServerTlsPolicies to return per call.", + // "description": "Maximum number of GatewaySecurityPolicyRules to return per call.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The value returned by the last `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListServerTlsPolicies` call, and that the system should return the next page of data.", + // "description": "The value returned by the last 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a continuation of a prior 'ListGatewaySecurityPolicyRules' call, and that the system should return the next page of data.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", + // "description": "Required. The project, location and GatewaySecurityPolicy from which the GatewaySecurityPolicyRules should be listed, specified in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/serverTlsPolicies", + // "path": "v1/{+parent}/rules", // "response": { - // "$ref": "ListServerTlsPoliciesResponse" + // "$ref": "ListGatewaySecurityPolicyRulesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5945,7 +6424,7 @@ func (c *ProjectsLocationsServerTlsPoliciesListCall) Do(opts ...googleapi.CallOp // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsServerTlsPoliciesListCall) Pages(ctx context.Context, f func(*ListServerTlsPoliciesResponse) error) error { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Pages(ctx context.Context, f func(*ListGatewaySecurityPolicyRulesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -5963,36 +6442,38 @@ func (c *ProjectsLocationsServerTlsPoliciesListCall) Pages(ctx context.Context, } } -// method id "networksecurity.projects.locations.serverTlsPolicies.patch": +// method id "networksecurity.projects.locations.gatewaySecurityPolicies.rules.patch": -type ProjectsLocationsServerTlsPoliciesPatchCall struct { - s *Service - name string - servertlspolicy *ServerTlsPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall struct { + s *Service + name string + gatewaysecuritypolicyrule *GatewaySecurityPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single ServerTlsPolicy. +// Patch: Updates the parameters of a single GatewaySecurityPolicyRule. // -// - name: Name of the ServerTlsPolicy resource. It matches the pattern -// `projects/*/locations/{location}/serverTlsPolicies/{server_tls_polic -// y}`. -func (r *ProjectsLocationsServerTlsPoliciesService) Patch(name string, servertlspolicy *ServerTlsPolicy) *ProjectsLocationsServerTlsPoliciesPatchCall { - c := &ProjectsLocationsServerTlsPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Name of the resource. ame is the full resource +// name so +// projects/{project}/locations/{location}/gatewaySecurityPolicies/{gat +// eway_security_policy}/rules/{rule} rule should match the pattern: +// (^a-z ([a-z0-9-]{0,61}[a-z0-9])?$). +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Patch(name string, gatewaysecuritypolicyrule *GatewaySecurityPolicyRule) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.servertlspolicy = servertlspolicy + c.gatewaysecuritypolicyrule = gatewaysecuritypolicyrule return c } // UpdateMask sets the optional parameter "updateMask": Field mask is -// used to specify the fields to be overwritten in the ServerTlsPolicy -// resource by the update. The fields specified in the update_mask are -// relative to the resource, not the full request. A field will be -// overwritten if it is in the mask. If the user does not provide a mask -// then all fields will be overwritten. -func (c *ProjectsLocationsServerTlsPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServerTlsPoliciesPatchCall { +// used to specify the fields to be overwritten in the +// GatewaySecurityPolicy resource by the update. The fields specified in +// the update_mask are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -6000,7 +6481,7 @@ func (c *ProjectsLocationsServerTlsPoliciesPatchCall) UpdateMask(updateMask stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesPatchCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6008,21 +6489,21 @@ func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesPatchCall { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Header() http.Header { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServerTlsPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6030,7 +6511,7 @@ func (c *ProjectsLocationsServerTlsPoliciesPatchCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.servertlspolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicyrule) if err != nil { return nil, err } @@ -6050,14 +6531,14 @@ func (c *ProjectsLocationsServerTlsPoliciesPatchCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.serverTlsPolicies.patch" call. +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6088,23 +6569,23 @@ func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Updates the parameters of a single ServerTlsPolicy.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + // "description": "Updates the parameters of a single GatewaySecurityPolicyRule.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", // "httpMethod": "PATCH", - // "id": "networksecurity.projects.locations.serverTlsPolicies.patch", + // "id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", + // "description": "Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the GatewaySecurityPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -6112,7 +6593,7 @@ func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Do(opts ...googleapi.CallO // }, // "path": "v1/{+name}", // "request": { - // "$ref": "ServerTlsPolicy" + // "$ref": "GatewaySecurityPolicyRule" // }, // "response": { // "$ref": "Operation" @@ -6124,36 +6605,40 @@ func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Do(opts ...googleapi.CallO } -// method id "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy": +// method id "networksecurity.projects.locations.operations.cancel": -type ProjectsLocationsServerTlsPoliciesSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsServerTlsPoliciesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall { - c := &ProjectsLocationsServerTlsPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall { +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6161,21 +6646,21 @@ func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Fields(s ...googlea // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall { +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6183,14 +6668,14 @@ func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) doRequest(alt strin } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6198,19 +6683,19 @@ func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) doRequest(alt strin } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// Do executes the "networksecurity.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6229,7 +6714,7 @@ func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6241,28 +6726,28 @@ func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Do(opts ...googleap } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:setIamPolicy", + // "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": "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy", + // "id": "networksecurity.projects.locations.operations.cancel", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "The name of the operation resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", + // "path": "v1/{+name}:cancel", // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" + // "$ref": "CancelOperationRequest" // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "Empty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6271,39 +6756,32 @@ func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Do(opts ...googleap } -// method id "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions": +// method id "networksecurity.projects.locations.operations.delete": -type ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsServerTlsPoliciesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall { - c := &ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall { +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6311,21 +6789,21 @@ func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) Fields(s ...g // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6333,14 +6811,2597 @@ func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) doRequest(alt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "networksecurity.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.projects.locations.serverTlsPolicies.create": + +type ProjectsLocationsServerTlsPoliciesCreateCall struct { + s *Service + parent string + servertlspolicy *ServerTlsPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new ServerTlsPolicy in a given project and +// location. +// +// - parent: The parent resource of the ServerTlsPolicy. Must be in the +// format `projects/*/locations/{location}`. +func (r *ProjectsLocationsServerTlsPoliciesService) Create(parent string, servertlspolicy *ServerTlsPolicy) *ProjectsLocationsServerTlsPoliciesCreateCall { + c := &ProjectsLocationsServerTlsPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.servertlspolicy = servertlspolicy + return c +} + +// ServerTlsPolicyId sets the optional parameter "serverTlsPolicyId": +// Required. Short name of the ServerTlsPolicy resource to be created. +// This value should be 1-63 characters long, containing only letters, +// numbers, hyphens, and underscores, and should not start with a +// number. E.g. "server_mtls_policy". +func (c *ProjectsLocationsServerTlsPoliciesCreateCall) ServerTlsPolicyId(serverTlsPolicyId string) *ProjectsLocationsServerTlsPoliciesCreateCall { + c.urlParams_.Set("serverTlsPolicyId", serverTlsPolicyId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServerTlsPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServerTlsPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServerTlsPoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServerTlsPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.servertlspolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serverTlsPolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.serverTlsPolicies.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServerTlsPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new ServerTlsPolicy in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.serverTlsPolicies.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource of the ServerTlsPolicy. Must be in the format `projects/*/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "serverTlsPolicyId": { + // "description": "Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"server_mtls_policy\".", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/serverTlsPolicies", + // "request": { + // "$ref": "ServerTlsPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.serverTlsPolicies.delete": + +type ProjectsLocationsServerTlsPoliciesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single ServerTlsPolicy. +// +// - name: A name of the ServerTlsPolicy to delete. Must be in the +// format `projects/*/locations/{location}/serverTlsPolicies/*`. +func (r *ProjectsLocationsServerTlsPoliciesService) Delete(name string) *ProjectsLocationsServerTlsPoliciesDeleteCall { + c := &ProjectsLocationsServerTlsPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.serverTlsPolicies.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServerTlsPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single ServerTlsPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + // "httpMethod": "DELETE", + // "id": "networksecurity.projects.locations.serverTlsPolicies.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the ServerTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.serverTlsPolicies.get": + +type ProjectsLocationsServerTlsPoliciesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single ServerTlsPolicy. +// +// - name: A name of the ServerTlsPolicy to get. Must be in the format +// `projects/*/locations/{location}/serverTlsPolicies/*`. +func (r *ProjectsLocationsServerTlsPoliciesService) Get(name string) *ProjectsLocationsServerTlsPoliciesGetCall { + c := &ProjectsLocationsServerTlsPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServerTlsPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServerTlsPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServerTlsPoliciesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServerTlsPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServerTlsPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServerTlsPoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.serverTlsPolicies.get" call. +// Exactly one of *ServerTlsPolicy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ServerTlsPolicy.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServerTlsPoliciesGetCall) Do(opts ...googleapi.CallOption) (*ServerTlsPolicy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ServerTlsPolicy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single ServerTlsPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.serverTlsPolicies.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the ServerTlsPolicy to get. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ServerTlsPolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.serverTlsPolicies.getIamPolicy": + +type ProjectsLocationsServerTlsPoliciesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServerTlsPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall { + c := &ProjectsLocationsServerTlsPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.serverTlsPolicies.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServerTlsPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.serverTlsPolicies.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.serverTlsPolicies.list": + +type ProjectsLocationsServerTlsPoliciesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists ServerTlsPolicies in a given project and location. +// +// - parent: The project and location from which the ServerTlsPolicies +// should be listed, specified in the format +// `projects/*/locations/{location}`. +func (r *ProjectsLocationsServerTlsPoliciesService) List(parent string) *ProjectsLocationsServerTlsPoliciesListCall { + c := &ProjectsLocationsServerTlsPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// ServerTlsPolicies to return per call. +func (c *ProjectsLocationsServerTlsPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsServerTlsPoliciesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListServerTlsPoliciesResponse` Indicates that this is a +// continuation of a prior `ListServerTlsPolicies` call, and that the +// system should return the next page of data. +func (c *ProjectsLocationsServerTlsPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsServerTlsPoliciesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServerTlsPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsServerTlsPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServerTlsPoliciesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServerTlsPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServerTlsPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServerTlsPoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serverTlsPolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.serverTlsPolicies.list" call. +// Exactly one of *ListServerTlsPoliciesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListServerTlsPoliciesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServerTlsPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListServerTlsPoliciesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListServerTlsPoliciesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists ServerTlsPolicies in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.serverTlsPolicies.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of ServerTlsPolicies to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListServerTlsPolicies` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/serverTlsPolicies", + // "response": { + // "$ref": "ListServerTlsPoliciesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServerTlsPoliciesListCall) Pages(ctx context.Context, f func(*ListServerTlsPoliciesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.projects.locations.serverTlsPolicies.patch": + +type ProjectsLocationsServerTlsPoliciesPatchCall struct { + s *Service + name string + servertlspolicy *ServerTlsPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single ServerTlsPolicy. +// +// - name: Name of the ServerTlsPolicy resource. It matches the pattern +// `projects/*/locations/{location}/serverTlsPolicies/{server_tls_polic +// y}`. +func (r *ProjectsLocationsServerTlsPoliciesService) Patch(name string, servertlspolicy *ServerTlsPolicy) *ProjectsLocationsServerTlsPoliciesPatchCall { + c := &ProjectsLocationsServerTlsPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.servertlspolicy = servertlspolicy + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the ServerTlsPolicy +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field will be +// overwritten if it is in the mask. If the user does not provide a mask +// then all fields will be overwritten. +func (c *ProjectsLocationsServerTlsPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServerTlsPoliciesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServerTlsPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.servertlspolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.serverTlsPolicies.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServerTlsPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single ServerTlsPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + // "httpMethod": "PATCH", + // "id": "networksecurity.projects.locations.serverTlsPolicies.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "ServerTlsPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy": + +type ProjectsLocationsServerTlsPoliciesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServerTlsPoliciesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall { + c := &ProjectsLocationsServerTlsPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServerTlsPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions": + +type ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServerTlsPoliciesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall { + c := &ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.tlsInspectionPolicies.create": + +type ProjectsLocationsTlsInspectionPoliciesCreateCall struct { + s *Service + parent string + tlsinspectionpolicy *TlsInspectionPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new TlsInspectionPolicy in a given project and +// location. +// +// - parent: The parent resource of the TlsInspectionPolicy. Must be in +// the format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsTlsInspectionPoliciesService) Create(parent string, tlsinspectionpolicy *TlsInspectionPolicy) *ProjectsLocationsTlsInspectionPoliciesCreateCall { + c := &ProjectsLocationsTlsInspectionPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.tlsinspectionpolicy = tlsinspectionpolicy + return c +} + +// TlsInspectionPolicyId sets the optional parameter +// "tlsInspectionPolicyId": Required. Short name of the +// TlsInspectionPolicy resource to be created. This value should be 1-63 +// characters long, containing only letters, numbers, hyphens, and +// underscores, and should not start with a number. E.g. +// "tls_inspection_policy1". +func (c *ProjectsLocationsTlsInspectionPoliciesCreateCall) TlsInspectionPolicyId(tlsInspectionPolicyId string) *ProjectsLocationsTlsInspectionPoliciesCreateCall { + c.urlParams_.Set("tlsInspectionPolicyId", tlsInspectionPolicyId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTlsInspectionPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsInspectionPoliciesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTlsInspectionPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsTlsInspectionPoliciesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTlsInspectionPoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTlsInspectionPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.tlsinspectionpolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tlsInspectionPolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.tlsInspectionPolicies.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsTlsInspectionPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new TlsInspectionPolicy in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.tlsInspectionPolicies.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource of the TlsInspectionPolicy. Must be in the format `projects/{project}/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "tlsInspectionPolicyId": { + // "description": "Required. Short name of the TlsInspectionPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"tls_inspection_policy1\".", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/tlsInspectionPolicies", + // "request": { + // "$ref": "TlsInspectionPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.tlsInspectionPolicies.delete": + +type ProjectsLocationsTlsInspectionPoliciesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single TlsInspectionPolicy. +// +// - name: A name of the TlsInspectionPolicy to delete. Must be in the +// format +// `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_ +// inspection_policy}`. +func (r *ProjectsLocationsTlsInspectionPoliciesService) Delete(name string) *ProjectsLocationsTlsInspectionPoliciesDeleteCall { + c := &ProjectsLocationsTlsInspectionPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If set to true, any rules +// for this TlsInspectionPolicy will also be deleted. (Otherwise, the +// request will only work if the TlsInspectionPolicy has no rules.) +func (c *ProjectsLocationsTlsInspectionPoliciesDeleteCall) Force(force bool) *ProjectsLocationsTlsInspectionPoliciesDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTlsInspectionPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsInspectionPoliciesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTlsInspectionPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTlsInspectionPoliciesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTlsInspectionPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTlsInspectionPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.tlsInspectionPolicies.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsTlsInspectionPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single TlsInspectionPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + // "httpMethod": "DELETE", + // "id": "networksecurity.projects.locations.tlsInspectionPolicies.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "force": { + // "description": "If set to true, any rules for this TlsInspectionPolicy will also be deleted. (Otherwise, the request will only work if the TlsInspectionPolicy has no rules.)", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. A name of the TlsInspectionPolicy to delete. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.tlsInspectionPolicies.get": + +type ProjectsLocationsTlsInspectionPoliciesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single TlsInspectionPolicy. +// +// - name: A name of the TlsInspectionPolicy to get. Must be in the +// format +// `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_ +// inspection_policy}`. +func (r *ProjectsLocationsTlsInspectionPoliciesService) Get(name string) *ProjectsLocationsTlsInspectionPoliciesGetCall { + c := &ProjectsLocationsTlsInspectionPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTlsInspectionPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsInspectionPoliciesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsTlsInspectionPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsInspectionPoliciesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTlsInspectionPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsTlsInspectionPoliciesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTlsInspectionPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTlsInspectionPoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.tlsInspectionPolicies.get" call. +// Exactly one of *TlsInspectionPolicy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TlsInspectionPolicy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsTlsInspectionPoliciesGetCall) Do(opts ...googleapi.CallOption) (*TlsInspectionPolicy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TlsInspectionPolicy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single TlsInspectionPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.tlsInspectionPolicies.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the TlsInspectionPolicy to get. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "TlsInspectionPolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.tlsInspectionPolicies.list": + +type ProjectsLocationsTlsInspectionPoliciesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists TlsInspectionPolicies in a given project and location. +// +// - parent: The project and location from which the +// TlsInspectionPolicies should be listed, specified in the format +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsTlsInspectionPoliciesService) List(parent string) *ProjectsLocationsTlsInspectionPoliciesListCall { + c := &ProjectsLocationsTlsInspectionPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// TlsInspectionPolicies to return per call. +func (c *ProjectsLocationsTlsInspectionPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsTlsInspectionPoliciesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last 'ListTlsInspectionPoliciesResponse' Indicates that this +// is a continuation of a prior 'ListTlsInspectionPolicies' call, and +// that the system should return the next page of data. +func (c *ProjectsLocationsTlsInspectionPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsTlsInspectionPoliciesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTlsInspectionPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsInspectionPoliciesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsTlsInspectionPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsInspectionPoliciesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTlsInspectionPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsTlsInspectionPoliciesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTlsInspectionPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTlsInspectionPoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tlsInspectionPolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.tlsInspectionPolicies.list" call. +// Exactly one of *ListTlsInspectionPoliciesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListTlsInspectionPoliciesResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsTlsInspectionPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListTlsInspectionPoliciesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListTlsInspectionPoliciesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists TlsInspectionPolicies in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.tlsInspectionPolicies.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of TlsInspectionPolicies to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last 'ListTlsInspectionPoliciesResponse' Indicates that this is a continuation of a prior 'ListTlsInspectionPolicies' call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the TlsInspectionPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/tlsInspectionPolicies", + // "response": { + // "$ref": "ListTlsInspectionPoliciesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsTlsInspectionPoliciesListCall) Pages(ctx context.Context, f func(*ListTlsInspectionPoliciesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.projects.locations.tlsInspectionPolicies.patch": + +type ProjectsLocationsTlsInspectionPoliciesPatchCall struct { + s *Service + name string + tlsinspectionpolicy *TlsInspectionPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single TlsInspectionPolicy. +// +// - name: Name of the resource. Name is of the form +// projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_i +// nspection_policy} tls_inspection_policy should match the +// pattern:(^a-z ([a-z0-9-]{0,61}[a-z0-9])?$). +func (r *ProjectsLocationsTlsInspectionPoliciesService) Patch(name string, tlsinspectionpolicy *TlsInspectionPolicy) *ProjectsLocationsTlsInspectionPoliciesPatchCall { + c := &ProjectsLocationsTlsInspectionPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.tlsinspectionpolicy = tlsinspectionpolicy + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the +// TlsInspectionPolicy resource by the update. The fields specified in +// the update_mask are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsTlsInspectionPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTlsInspectionPoliciesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTlsInspectionPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsInspectionPoliciesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTlsInspectionPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsTlsInspectionPoliciesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTlsInspectionPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTlsInspectionPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.tlsinspectionpolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.tlsInspectionPolicies.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsTlsInspectionPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single TlsInspectionPolicy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + // "httpMethod": "PATCH", + // "id": "networksecurity.projects.locations.tlsInspectionPolicies.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} tls_inspection_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsInspectionPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "TlsInspectionPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.urlLists.create": + +type ProjectsLocationsUrlListsCreateCall struct { + s *Service + parent string + urllist *UrlList + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new UrlList in a given project and location. +// +// - parent: The parent resource of the UrlList. Must be in the format +// `projects/*/locations/{location}`. +func (r *ProjectsLocationsUrlListsService) Create(parent string, urllist *UrlList) *ProjectsLocationsUrlListsCreateCall { + c := &ProjectsLocationsUrlListsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.urllist = urllist + return c +} + +// UrlListId sets the optional parameter "urlListId": Required. Short +// name of the UrlList resource to be created. This value should be 1-63 +// characters long, containing only letters, numbers, hyphens, and +// underscores, and should not start with a number. E.g. "url_list". +func (c *ProjectsLocationsUrlListsCreateCall) UrlListId(urlListId string) *ProjectsLocationsUrlListsCreateCall { + c.urlParams_.Set("urlListId", urlListId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsUrlListsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsUrlListsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsUrlListsCreateCall) Context(ctx context.Context) *ProjectsLocationsUrlListsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsUrlListsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUrlListsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urllist) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/urlLists") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6348,20 +9409,471 @@ func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.urlLists.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsUrlListsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new UrlList in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists", + // "httpMethod": "POST", + // "id": "networksecurity.projects.locations.urlLists.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource of the UrlList. Must be in the format `projects/*/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "urlListId": { + // "description": "Required. Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"url_list\".", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/urlLists", + // "request": { + // "$ref": "UrlList" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.urlLists.delete": + +type ProjectsLocationsUrlListsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single UrlList. +// +// - name: A name of the UrlList to delete. Must be in the format +// `projects/*/locations/{location}/urlLists/*`. +func (r *ProjectsLocationsUrlListsService) Delete(name string) *ProjectsLocationsUrlListsDeleteCall { + c := &ProjectsLocationsUrlListsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsUrlListsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsUrlListsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsUrlListsDeleteCall) Context(ctx context.Context) *ProjectsLocationsUrlListsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsUrlListsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUrlListsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.urlLists.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsUrlListsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single UrlList.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + // "httpMethod": "DELETE", + // "id": "networksecurity.projects.locations.urlLists.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the UrlList to delete. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.urlLists.get": + +type ProjectsLocationsUrlListsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single UrlList. +// +// - name: A name of the UrlList to get. Must be in the format +// `projects/*/locations/{location}/urlLists/*`. +func (r *ProjectsLocationsUrlListsService) Get(name string) *ProjectsLocationsUrlListsGetCall { + c := &ProjectsLocationsUrlListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsUrlListsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsUrlListsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsUrlListsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsUrlListsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsUrlListsGetCall) Context(ctx context.Context) *ProjectsLocationsUrlListsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsUrlListsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUrlListsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.urlLists.get" call. +// Exactly one of *UrlList or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *UrlList.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsUrlListsGetCall) Do(opts ...googleapi.CallOption) (*UrlList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &UrlList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single UrlList.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.urlLists.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the UrlList to get. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "UrlList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networksecurity.projects.locations.urlLists.list": + +type ProjectsLocationsUrlListsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists UrlLists in a given project and location. +// +// - parent: The project and location from which the UrlLists should be +// listed, specified in the format +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsUrlListsService) List(parent string) *ProjectsLocationsUrlListsListCall { + c := &ProjectsLocationsUrlListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// UrlLists to return per call. +func (c *ProjectsLocationsUrlListsListCall) PageSize(pageSize int64) *ProjectsLocationsUrlListsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListUrlListsResponse` Indicates that this is a +// continuation of a prior `ListUrlLists` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsUrlListsListCall) PageToken(pageToken string) *ProjectsLocationsUrlListsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsUrlListsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsUrlListsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsUrlListsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsUrlListsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsUrlListsListCall) Context(ctx context.Context) *ProjectsLocationsUrlListsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsUrlListsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUrlListsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/urlLists") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions" call. -// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "networksecurity.projects.locations.urlLists.list" call. +// Exactly one of *ListUrlListsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListUrlListsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsUrlListsListCall) Do(opts ...googleapi.CallOption) (*ListUrlListsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6380,7 +9892,7 @@ func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &ListUrlListsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6392,28 +9904,219 @@ func (c *ProjectsLocationsServerTlsPoliciesTestIamPermissionsCall) Do(opts ...go } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions", + // "description": "Lists UrlLists in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists", + // "httpMethod": "GET", + // "id": "networksecurity.projects.locations.urlLists.list", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "pageSize": { + // "description": "Maximum number of UrlLists to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListUrlListsResponse` Indicates that this is a continuation of a prior `ListUrlLists` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the UrlLists should be listed, specified in the format `projects/{project}/locations/{location}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", + // "path": "v1/{+parent}/urlLists", + // "response": { + // "$ref": "ListUrlListsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsUrlListsListCall) Pages(ctx context.Context, f func(*ListUrlListsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networksecurity.projects.locations.urlLists.patch": + +type ProjectsLocationsUrlListsPatchCall struct { + s *Service + name string + urllist *UrlList + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single UrlList. +// +// - name: Name of the resource provided by the user. Name is of the +// form projects/{project}/locations/{location}/urlLists/{url_list} +// url_list should match the pattern:(^a-z +// ([a-z0-9-]{0,61}[a-z0-9])?$). +func (r *ProjectsLocationsUrlListsService) Patch(name string, urllist *UrlList) *ProjectsLocationsUrlListsPatchCall { + c := &ProjectsLocationsUrlListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.urllist = urllist + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the UrlList resource +// by the update. The fields specified in the update_mask are relative +// to the resource, not the full request. A field will be overwritten if +// it is in the mask. If the user does not provide a mask then all +// fields will be overwritten. +func (c *ProjectsLocationsUrlListsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsUrlListsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsUrlListsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsUrlListsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsUrlListsPatchCall) Context(ctx context.Context) *ProjectsLocationsUrlListsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsUrlListsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUrlListsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urllist) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.urlLists.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsUrlListsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single UrlList.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + // "httpMethod": "PATCH", + // "id": "networksecurity.projects.locations.urlLists.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource provided by the user. Name is of the form projects/{project}/locations/{location}/urlLists/{url_list} url_list should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the UrlList resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // "$ref": "UrlList" // }, // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 4a330d48c1b..73736c73317 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -120,11 +120,6 @@ "catalog" ], "parameters": { - "banner": { - "description": "The banner context for completion suggestions.", - "location": "query", - "type": "string" - }, "catalog": { "description": "Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", "location": "path", @@ -142,6 +137,11 @@ "location": "query", "type": "string" }, + "entity": { + "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. If this is set, it should be exactly matched with UserEvent.entity to get per-entity autocomplete results.", + "location": "query", + "type": "string" + }, "languageCodes": { "description": "Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.", "location": "query", @@ -2031,7 +2031,7 @@ } } }, - "revision": "20230330", + "revision": "20230406", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4260,10 +4260,6 @@ "description": "Request message for SearchService.Search method.", "id": "GoogleCloudRetailV2SearchRequest", "properties": { - "banner": { - "description": "Represents the banner in request, for projects that combine banners. For example: a retailer can sell products under different banners like retailer-main, retailer-baby, retailer-meds, etc. under one project.", - "type": "string" - }, "boostSpec": { "$ref": "GoogleCloudRetailV2SearchRequestBoostSpec", "description": "Boost specification to boost certain products. See more details at this [user guide](https://cloud.google.com/retail/docs/boosting). Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions." @@ -4280,8 +4276,12 @@ "$ref": "GoogleCloudRetailV2SearchRequestDynamicFacetSpec", "description": "Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic facets. Do not set this field. The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated." }, + "entity": { + "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. If this is set, it should be exactly matched with UserEvent.entity to get search results boosted by entity.", + "type": "string" + }, "facetSpecs": { - "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", "items": { "$ref": "GoogleCloudRetailV2SearchRequestFacetSpec" }, @@ -4979,10 +4979,6 @@ "description": "Highly recommended for user events that are the result of PredictionService.Predict. This field enables accurate attribution of recommendation model performance. The value must be a valid PredictResponse.attribution_token for user events that are the result of PredictionService.Predict. The value must be a valid SearchResponse.attribution_token for user events that are the result of SearchService.Search. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass PredictResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the PredictResponse.attribution_token to this field.", "type": "string" }, - "banner": { - "description": "Represents the banner of the user event, for projects that combine banners. For example: retailer can have events from multiple banners like retailer-main, retailer-baby, retailer-meds, etc. under one project.", - "type": "string" - }, "cartId": { "description": "The ID or name of the associated shopping cart. This ID is used to associate multiple items added or present in the cart before purchase. This can only be set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view` events.", "type": "string" @@ -4991,6 +4987,10 @@ "$ref": "GoogleCloudRetailV2CompletionDetail", "description": "The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." }, + "entity": { + "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. It is recommended to set this field to get better per-entity search, completion and prediction results.", + "type": "string" + }, "eventTime": { "description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", "format": "google-datetime", diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 45b5d6251bd..6fffdfdd02c 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -4649,12 +4649,6 @@ func (s *GoogleCloudRetailV2RuleTwowaySynonymsAction) MarshalJSON() ([]byte, err // GoogleCloudRetailV2SearchRequest: Request message for // SearchService.Search method. type GoogleCloudRetailV2SearchRequest struct { - // Banner: Represents the banner in request, for projects that combine - // banners. For example: a retailer can sell products under different - // banners like retailer-main, retailer-baby, retailer-meds, etc. under - // one project. - Banner string `json:"banner,omitempty"` - // BoostSpec: Boost specification to boost certain products. See more // details at this user guide // (https://cloud.google.com/retail/docs/boosting). Notice that if both @@ -4689,8 +4683,15 @@ type GoogleCloudRetailV2SearchRequest struct { // dynamically generated. DynamicFacetSpec *GoogleCloudRetailV2SearchRequestDynamicFacetSpec `json:"dynamicFacetSpec,omitempty"` + // Entity: The entity for customers that may run multiple different + // entities, domains, sites or regions, for example, "Google US", + // "Google Ads", "Waymo", "google.com", "youtube.com", etc. If this is + // set, it should be exactly matched with UserEvent.entity to get search + // results boosted by entity. + Entity string `json:"entity,omitempty"` + // FacetSpecs: Facet specifications for faceted search. If empty, no - // facets are returned. A maximum of 100 values are allowed. Otherwise, + // facets are returned. A maximum of 200 values are allowed. Otherwise, // an INVALID_ARGUMENT error is returned. FacetSpecs []*GoogleCloudRetailV2SearchRequestFacetSpec `json:"facetSpecs,omitempty"` @@ -4845,7 +4846,7 @@ type GoogleCloudRetailV2SearchRequest struct { // is returned. VisitorId string `json:"visitorId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Banner") to + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4853,8 +4854,8 @@ type GoogleCloudRetailV2SearchRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Banner") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "BoostSpec") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -5999,12 +6000,6 @@ type GoogleCloudRetailV2UserEvent struct { // PredictResponse.attribution_token to this field. AttributionToken string `json:"attributionToken,omitempty"` - // Banner: Represents the banner of the user event, for projects that - // combine banners. For example: retailer can have events from multiple - // banners like retailer-main, retailer-baby, retailer-meds, etc. under - // one project. - Banner string `json:"banner,omitempty"` - // CartId: The ID or name of the associated shopping cart. This ID is // used to associate multiple items added or present in the cart before // purchase. This can only be set for `add-to-cart`, @@ -6016,6 +6011,13 @@ type GoogleCloudRetailV2UserEvent struct { // function is enabled and the user clicks a suggestion for search. CompletionDetail *GoogleCloudRetailV2CompletionDetail `json:"completionDetail,omitempty"` + // Entity: The entity for customers that may run multiple different + // entities, domains, sites or regions, for example, "Google US", + // "Google Ads", "Waymo", "google.com", "youtube.com", etc. It is + // recommended to set this field to get better per-entity search, + // completion and prediction results. + Entity string `json:"entity,omitempty"` + // EventTime: Only required for UserEventService.ImportUserEvents // method. Timestamp of when the user event happened. EventTime string `json:"eventTime,omitempty"` @@ -8922,13 +8924,6 @@ func (r *ProjectsLocationsCatalogsService) CompleteQuery(catalog string) *Projec return c } -// Banner sets the optional parameter "banner": The banner context for -// completion suggestions. -func (c *ProjectsLocationsCatalogsCompleteQueryCall) Banner(banner string) *ProjectsLocationsCatalogsCompleteQueryCall { - c.urlParams_.Set("banner", banner) - return c -} - // Dataset sets the optional parameter "dataset": Determines which // dataset to use for fetching completion. "user-data" will use the // imported dataset through CompletionService.ImportCompletionData. @@ -8954,6 +8949,16 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) DeviceType(deviceType strin return c } +// Entity sets the optional parameter "entity": The entity for customers +// that may run multiple different entities, domains, sites or regions, +// for example, "Google US", "Google Ads", "Waymo", "google.com", +// "youtube.com", etc. If this is set, it should be exactly matched with +// UserEvent.entity to get per-entity autocomplete results. +func (c *ProjectsLocationsCatalogsCompleteQueryCall) Entity(entity string) *ProjectsLocationsCatalogsCompleteQueryCall { + c.urlParams_.Set("entity", entity) + return c +} + // LanguageCodes sets the optional parameter "languageCodes": Note that // this field applies for `user-data` dataset only. For requests with // `cloud-retail` dataset, setting this field has no effect. The @@ -9108,11 +9113,6 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp // "catalog" // ], // "parameters": { - // "banner": { - // "description": "The banner context for completion suggestions.", - // "location": "query", - // "type": "string" - // }, // "catalog": { // "description": "Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", // "location": "path", @@ -9130,6 +9130,11 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp // "location": "query", // "type": "string" // }, + // "entity": { + // "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. If this is set, it should be exactly matched with UserEvent.entity to get per-entity autocomplete results.", + // "location": "query", + // "type": "string" + // }, // "languageCodes": { // "description": "Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.", // "location": "query", diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index b4fcd4fbe82..86353143c0c 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -120,11 +120,6 @@ "catalog" ], "parameters": { - "banner": { - "description": "The banner context for completion suggestions.", - "location": "query", - "type": "string" - }, "catalog": { "description": "Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", "location": "path", @@ -147,6 +142,11 @@ "location": "query", "type": "boolean" }, + "entity": { + "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. If this is set, it should be exactly matched with UserEvent.entity to get per-entity autocomplete results.", + "location": "query", + "type": "string" + }, "languageCodes": { "description": "Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.", "location": "query", @@ -2222,7 +2222,7 @@ } } }, - "revision": "20230330", + "revision": "20230406", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3212,9 +3212,21 @@ "description": "Custom attributes for the suggestion term. * For \"user-data\", the attributes are additional custom attributes ingested through BigQuery. * For \"cloud-retail\", the attributes are product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly.", "type": "object" }, + "facets": { + "description": "Facet information for the suggestion term. Gives the number of items resulting from a search with this suggestion term for each facet. This is an experimental feature for limited customers. Please reach out to the support team if you would like to receive this information.", + "items": { + "$ref": "GoogleCloudRetailV2alphaSearchResponseFacet" + }, + "type": "array" + }, "suggestion": { "description": "The suggestion for the query.", "type": "string" + }, + "totalProductCount": { + "description": "Total number of products associated with a search with this suggestion. This is an experimental feature for limited customers. Please reach out to the support team if you would like to receive this information.", + "format": "int32", + "type": "integer" } }, "type": "object" @@ -5358,10 +5370,6 @@ "description": "Request message for SearchService.Search method.", "id": "GoogleCloudRetailV2alphaSearchRequest", "properties": { - "banner": { - "description": "Represents the banner in request, for projects that combine banners. For example: a retailer can sell products under different banners like retailer-main, retailer-baby, retailer-meds, etc. under one project.", - "type": "string" - }, "boostSpec": { "$ref": "GoogleCloudRetailV2alphaSearchRequestBoostSpec", "description": "Boost specification to boost certain products. See more details at this [user guide](https://cloud.google.com/retail/docs/boosting). Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions." @@ -5378,8 +5386,12 @@ "$ref": "GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec", "description": "Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic facets. Do not set this field. The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated." }, + "entity": { + "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. If this is set, it should be exactly matched with UserEvent.entity to get search results boosted by entity.", + "type": "string" + }, "facetSpecs": { - "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", "items": { "$ref": "GoogleCloudRetailV2alphaSearchRequestFacetSpec" }, @@ -6112,10 +6124,6 @@ "description": "Highly recommended for user events that are the result of PredictionService.Predict. This field enables accurate attribution of recommendation model performance. The value must be a valid PredictResponse.attribution_token for user events that are the result of PredictionService.Predict. The value must be a valid SearchResponse.attribution_token for user events that are the result of SearchService.Search. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass PredictResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the PredictResponse.attribution_token to this field.", "type": "string" }, - "banner": { - "description": "Represents the banner of the user event, for projects that combine banners. For example: retailer can have events from multiple banners like retailer-main, retailer-baby, retailer-meds, etc. under one project.", - "type": "string" - }, "cartId": { "description": "The ID or name of the associated shopping cart. This ID is used to associate multiple items added or present in the cart before purchase. This can only be set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view` events.", "type": "string" @@ -6124,6 +6132,10 @@ "$ref": "GoogleCloudRetailV2alphaCompletionDetail", "description": "The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." }, + "entity": { + "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. It is recommended to set this field to get better per-entity search, completion and prediction results.", + "type": "string" + }, "eventTime": { "description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", "format": "google-datetime", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index c04f728568b..ec9d8855caa 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -2117,9 +2117,22 @@ type GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult struct { // UserEvent.product_details is imported properly. Attributes map[string]GoogleCloudRetailV2alphaCustomAttribute `json:"attributes,omitempty"` + // Facets: Facet information for the suggestion term. Gives the number + // of items resulting from a search with this suggestion term for each + // facet. This is an experimental feature for limited customers. Please + // reach out to the support team if you would like to receive this + // information. + Facets []*GoogleCloudRetailV2alphaSearchResponseFacet `json:"facets,omitempty"` + // Suggestion: The suggestion for the query. Suggestion string `json:"suggestion,omitempty"` + // TotalProductCount: Total number of products associated with a search + // with this suggestion. This is an experimental feature for limited + // customers. Please reach out to the support team if you would like to + // receive this information. + TotalProductCount int64 `json:"totalProductCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "Attributes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -6358,12 +6371,6 @@ func (s *GoogleCloudRetailV2alphaRuleTwowaySynonymsAction) MarshalJSON() ([]byte // GoogleCloudRetailV2alphaSearchRequest: Request message for // SearchService.Search method. type GoogleCloudRetailV2alphaSearchRequest struct { - // Banner: Represents the banner in request, for projects that combine - // banners. For example: a retailer can sell products under different - // banners like retailer-main, retailer-baby, retailer-meds, etc. under - // one project. - Banner string `json:"banner,omitempty"` - // BoostSpec: Boost specification to boost certain products. See more // details at this user guide // (https://cloud.google.com/retail/docs/boosting). Notice that if both @@ -6398,8 +6405,15 @@ type GoogleCloudRetailV2alphaSearchRequest struct { // dynamically generated. DynamicFacetSpec *GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec `json:"dynamicFacetSpec,omitempty"` + // Entity: The entity for customers that may run multiple different + // entities, domains, sites or regions, for example, "Google US", + // "Google Ads", "Waymo", "google.com", "youtube.com", etc. If this is + // set, it should be exactly matched with UserEvent.entity to get search + // results boosted by entity. + Entity string `json:"entity,omitempty"` + // FacetSpecs: Facet specifications for faceted search. If empty, no - // facets are returned. A maximum of 100 values are allowed. Otherwise, + // facets are returned. A maximum of 200 values are allowed. Otherwise, // an INVALID_ARGUMENT error is returned. FacetSpecs []*GoogleCloudRetailV2alphaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` @@ -6569,7 +6583,7 @@ type GoogleCloudRetailV2alphaSearchRequest struct { // is returned. VisitorId string `json:"visitorId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Banner") to + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6577,8 +6591,8 @@ type GoogleCloudRetailV2alphaSearchRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Banner") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "BoostSpec") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -7760,12 +7774,6 @@ type GoogleCloudRetailV2alphaUserEvent struct { // PredictResponse.attribution_token to this field. AttributionToken string `json:"attributionToken,omitempty"` - // Banner: Represents the banner of the user event, for projects that - // combine banners. For example: retailer can have events from multiple - // banners like retailer-main, retailer-baby, retailer-meds, etc. under - // one project. - Banner string `json:"banner,omitempty"` - // CartId: The ID or name of the associated shopping cart. This ID is // used to associate multiple items added or present in the cart before // purchase. This can only be set for `add-to-cart`, @@ -7777,6 +7785,13 @@ type GoogleCloudRetailV2alphaUserEvent struct { // function is enabled and the user clicks a suggestion for search. CompletionDetail *GoogleCloudRetailV2alphaCompletionDetail `json:"completionDetail,omitempty"` + // Entity: The entity for customers that may run multiple different + // entities, domains, sites or regions, for example, "Google US", + // "Google Ads", "Waymo", "google.com", "youtube.com", etc. It is + // recommended to set this field to get better per-entity search, + // completion and prediction results. + Entity string `json:"entity,omitempty"` + // EventTime: Only required for UserEventService.ImportUserEvents // method. Timestamp of when the user event happened. EventTime string `json:"eventTime,omitempty"` @@ -9352,13 +9367,6 @@ func (r *ProjectsLocationsCatalogsService) CompleteQuery(catalog string) *Projec return c } -// Banner sets the optional parameter "banner": The banner context for -// completion suggestions. -func (c *ProjectsLocationsCatalogsCompleteQueryCall) Banner(banner string) *ProjectsLocationsCatalogsCompleteQueryCall { - c.urlParams_.Set("banner", banner) - return c -} - // Dataset sets the optional parameter "dataset": Determines which // dataset to use for fetching completion. "user-data" will use the // imported dataset through CompletionService.ImportCompletionData. @@ -9393,6 +9401,16 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) EnableAttributeSuggestions( return c } +// Entity sets the optional parameter "entity": The entity for customers +// that may run multiple different entities, domains, sites or regions, +// for example, "Google US", "Google Ads", "Waymo", "google.com", +// "youtube.com", etc. If this is set, it should be exactly matched with +// UserEvent.entity to get per-entity autocomplete results. +func (c *ProjectsLocationsCatalogsCompleteQueryCall) Entity(entity string) *ProjectsLocationsCatalogsCompleteQueryCall { + c.urlParams_.Set("entity", entity) + return c +} + // LanguageCodes sets the optional parameter "languageCodes": Note that // this field applies for `user-data` dataset only. For requests with // `cloud-retail` dataset, setting this field has no effect. The @@ -9547,11 +9565,6 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp // "catalog" // ], // "parameters": { - // "banner": { - // "description": "The banner context for completion suggestions.", - // "location": "query", - // "type": "string" - // }, // "catalog": { // "description": "Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", // "location": "path", @@ -9574,6 +9587,11 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp // "location": "query", // "type": "boolean" // }, + // "entity": { + // "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. If this is set, it should be exactly matched with UserEvent.entity to get per-entity autocomplete results.", + // "location": "query", + // "type": "string" + // }, // "languageCodes": { // "description": "Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.", // "location": "query", diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 8879c27f2b0..a5f1a334b9a 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -120,11 +120,6 @@ "catalog" ], "parameters": { - "banner": { - "description": "The banner context for completion suggestions.", - "location": "query", - "type": "string" - }, "catalog": { "description": "Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", "location": "path", @@ -142,6 +137,11 @@ "location": "query", "type": "string" }, + "entity": { + "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. If this is set, it should be exactly matched with UserEvent.entity to get per-entity autocomplete results.", + "location": "query", + "type": "string" + }, "languageCodes": { "description": "Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.", "location": "query", @@ -2059,7 +2059,7 @@ } } }, - "revision": "20230330", + "revision": "20230406", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5753,10 +5753,6 @@ "description": "Request message for SearchService.Search method.", "id": "GoogleCloudRetailV2betaSearchRequest", "properties": { - "banner": { - "description": "Represents the banner in request, for projects that combine banners. For example: a retailer can sell products under different banners like retailer-main, retailer-baby, retailer-meds, etc. under one project.", - "type": "string" - }, "boostSpec": { "$ref": "GoogleCloudRetailV2betaSearchRequestBoostSpec", "description": "Boost specification to boost certain products. See more details at this [user guide](https://cloud.google.com/retail/docs/boosting). Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions." @@ -5773,8 +5769,12 @@ "$ref": "GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec", "description": "Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic facets. Do not set this field. The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated." }, + "entity": { + "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. If this is set, it should be exactly matched with UserEvent.entity to get search results boosted by entity.", + "type": "string" + }, "facetSpecs": { - "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", "items": { "$ref": "GoogleCloudRetailV2betaSearchRequestFacetSpec" }, @@ -6472,10 +6472,6 @@ "description": "Highly recommended for user events that are the result of PredictionService.Predict. This field enables accurate attribution of recommendation model performance. The value must be a valid PredictResponse.attribution_token for user events that are the result of PredictionService.Predict. The value must be a valid SearchResponse.attribution_token for user events that are the result of SearchService.Search. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass PredictResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the PredictResponse.attribution_token to this field.", "type": "string" }, - "banner": { - "description": "Represents the banner of the user event, for projects that combine banners. For example: retailer can have events from multiple banners like retailer-main, retailer-baby, retailer-meds, etc. under one project.", - "type": "string" - }, "cartId": { "description": "The ID or name of the associated shopping cart. This ID is used to associate multiple items added or present in the cart before purchase. This can only be set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view` events.", "type": "string" @@ -6484,6 +6480,10 @@ "$ref": "GoogleCloudRetailV2betaCompletionDetail", "description": "The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." }, + "entity": { + "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. It is recommended to set this field to get better per-entity search, completion and prediction results.", + "type": "string" + }, "eventTime": { "description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", "format": "google-datetime", diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 7582016bb81..a83596ad52c 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -7252,12 +7252,6 @@ func (s *GoogleCloudRetailV2betaRuleTwowaySynonymsAction) MarshalJSON() ([]byte, // GoogleCloudRetailV2betaSearchRequest: Request message for // SearchService.Search method. type GoogleCloudRetailV2betaSearchRequest struct { - // Banner: Represents the banner in request, for projects that combine - // banners. For example: a retailer can sell products under different - // banners like retailer-main, retailer-baby, retailer-meds, etc. under - // one project. - Banner string `json:"banner,omitempty"` - // BoostSpec: Boost specification to boost certain products. See more // details at this user guide // (https://cloud.google.com/retail/docs/boosting). Notice that if both @@ -7292,8 +7286,15 @@ type GoogleCloudRetailV2betaSearchRequest struct { // dynamically generated. DynamicFacetSpec *GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec `json:"dynamicFacetSpec,omitempty"` + // Entity: The entity for customers that may run multiple different + // entities, domains, sites or regions, for example, "Google US", + // "Google Ads", "Waymo", "google.com", "youtube.com", etc. If this is + // set, it should be exactly matched with UserEvent.entity to get search + // results boosted by entity. + Entity string `json:"entity,omitempty"` + // FacetSpecs: Facet specifications for faceted search. If empty, no - // facets are returned. A maximum of 100 values are allowed. Otherwise, + // facets are returned. A maximum of 200 values are allowed. Otherwise, // an INVALID_ARGUMENT error is returned. FacetSpecs []*GoogleCloudRetailV2betaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` @@ -7448,7 +7449,7 @@ type GoogleCloudRetailV2betaSearchRequest struct { // is returned. VisitorId string `json:"visitorId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Banner") to + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7456,8 +7457,8 @@ type GoogleCloudRetailV2betaSearchRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Banner") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "BoostSpec") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -8602,12 +8603,6 @@ type GoogleCloudRetailV2betaUserEvent struct { // PredictResponse.attribution_token to this field. AttributionToken string `json:"attributionToken,omitempty"` - // Banner: Represents the banner of the user event, for projects that - // combine banners. For example: retailer can have events from multiple - // banners like retailer-main, retailer-baby, retailer-meds, etc. under - // one project. - Banner string `json:"banner,omitempty"` - // CartId: The ID or name of the associated shopping cart. This ID is // used to associate multiple items added or present in the cart before // purchase. This can only be set for `add-to-cart`, @@ -8619,6 +8614,13 @@ type GoogleCloudRetailV2betaUserEvent struct { // function is enabled and the user clicks a suggestion for search. CompletionDetail *GoogleCloudRetailV2betaCompletionDetail `json:"completionDetail,omitempty"` + // Entity: The entity for customers that may run multiple different + // entities, domains, sites or regions, for example, "Google US", + // "Google Ads", "Waymo", "google.com", "youtube.com", etc. It is + // recommended to set this field to get better per-entity search, + // completion and prediction results. + Entity string `json:"entity,omitempty"` + // EventTime: Only required for UserEventService.ImportUserEvents // method. Timestamp of when the user event happened. EventTime string `json:"eventTime,omitempty"` @@ -9163,13 +9165,6 @@ func (r *ProjectsLocationsCatalogsService) CompleteQuery(catalog string) *Projec return c } -// Banner sets the optional parameter "banner": The banner context for -// completion suggestions. -func (c *ProjectsLocationsCatalogsCompleteQueryCall) Banner(banner string) *ProjectsLocationsCatalogsCompleteQueryCall { - c.urlParams_.Set("banner", banner) - return c -} - // Dataset sets the optional parameter "dataset": Determines which // dataset to use for fetching completion. "user-data" will use the // imported dataset through CompletionService.ImportCompletionData. @@ -9195,6 +9190,16 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) DeviceType(deviceType strin return c } +// Entity sets the optional parameter "entity": The entity for customers +// that may run multiple different entities, domains, sites or regions, +// for example, "Google US", "Google Ads", "Waymo", "google.com", +// "youtube.com", etc. If this is set, it should be exactly matched with +// UserEvent.entity to get per-entity autocomplete results. +func (c *ProjectsLocationsCatalogsCompleteQueryCall) Entity(entity string) *ProjectsLocationsCatalogsCompleteQueryCall { + c.urlParams_.Set("entity", entity) + return c +} + // LanguageCodes sets the optional parameter "languageCodes": Note that // this field applies for `user-data` dataset only. For requests with // `cloud-retail` dataset, setting this field has no effect. The @@ -9349,11 +9354,6 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp // "catalog" // ], // "parameters": { - // "banner": { - // "description": "The banner context for completion suggestions.", - // "location": "query", - // "type": "string" - // }, // "catalog": { // "description": "Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", // "location": "path", @@ -9371,6 +9371,11 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp // "location": "query", // "type": "string" // }, + // "entity": { + // "description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, \"Google US\", \"Google Ads\", \"Waymo\", \"google.com\", \"youtube.com\", etc. If this is set, it should be exactly matched with UserEvent.entity to get per-entity autocomplete results.", + // "location": "query", + // "type": "string" + // }, // "languageCodes": { // "description": "Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.", // "location": "query", diff --git a/servicemanagement/v1/servicemanagement-api.json b/servicemanagement/v1/servicemanagement-api.json index 576194a549b..de4b16d7b72 100644 --- a/servicemanagement/v1/servicemanagement-api.json +++ b/servicemanagement/v1/servicemanagement-api.json @@ -829,7 +829,7 @@ } } }, - "revision": "20230331", + "revision": "20230407", "rootUrl": "https://servicemanagement.googleapis.com/", "schemas": { "Advice": { @@ -2871,7 +2871,7 @@ "type": "array" }, "newIssueUri": { - "description": "Link to a place that API users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865\u0026template=1161103", + "description": "Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865\u0026template=1161103", "type": "string" }, "organization": { diff --git a/servicemanagement/v1/servicemanagement-gen.go b/servicemanagement/v1/servicemanagement-gen.go index b06a9a95195..f5fd175376b 100644 --- a/servicemanagement/v1/servicemanagement-gen.go +++ b/servicemanagement/v1/servicemanagement-gen.go @@ -4224,7 +4224,7 @@ type Publishing struct { // methods that use the long-running operation pattern. MethodSettings []*MethodSettings `json:"methodSettings,omitempty"` - // NewIssueUri: Link to a place that API users can report issues. + // NewIssueUri: Link to a *public* URI where users can report issues. // Example: // https://issuetracker.google.com/issues/new?component=190865&template=1161103 NewIssueUri string `json:"newIssueUri,omitempty"` diff --git a/vault/v1/vault-api.json b/vault/v1/vault-api.json index 209494b53bc..1a43194fee0 100644 --- a/vault/v1/vault-api.json +++ b/vault/v1/vault-api.json @@ -1193,7 +1193,7 @@ } } }, - "revision": "20230323", + "revision": "20230405", "rootUrl": "https://vault.googleapis.com/", "schemas": { "AccountCount": { @@ -2135,6 +2135,22 @@ "description": "Additional options for Gmail search", "id": "MailOptions", "properties": { + "clientSideEncryptedOption": { + "description": "Specifies whether the results should include encrypted content, unencrypted content, or both. Defaults to including both.", + "enum": [ + "CLIENT_SIDE_ENCRYPTED_OPTION_UNSPECIFIED", + "CLIENT_SIDE_ENCRYPTED_OPTION_ANY", + "CLIENT_SIDE_ENCRYPTED_OPTION_ENCRYPTED", + "CLIENT_SIDE_ENCRYPTED_OPTION_UNENCRYPTED" + ], + "enumDescriptions": [ + "Encryption status unspecified. Results include both client-side encrypted and non-encrypted content.", + "Include both client-side encrypted and unencrypted content in results.", + "Include client-side encrypted content only.", + "Include unencrypted content only." + ], + "type": "string" + }, "excludeDrafts": { "description": "Set to **true** to exclude drafts.", "type": "boolean" diff --git a/vault/v1/vault-gen.go b/vault/v1/vault-gen.go index e3c3c1bd75f..6229b2145e7 100644 --- a/vault/v1/vault-gen.go +++ b/vault/v1/vault-gen.go @@ -1801,23 +1801,41 @@ func (s *MailExportOptions) MarshalJSON() ([]byte, error) { // MailOptions: Additional options for Gmail search type MailOptions struct { + // ClientSideEncryptedOption: Specifies whether the results should + // include encrypted content, unencrypted content, or both. Defaults to + // including both. + // + // Possible values: + // "CLIENT_SIDE_ENCRYPTED_OPTION_UNSPECIFIED" - Encryption status + // unspecified. Results include both client-side encrypted and + // non-encrypted content. + // "CLIENT_SIDE_ENCRYPTED_OPTION_ANY" - Include both client-side + // encrypted and unencrypted content in results. + // "CLIENT_SIDE_ENCRYPTED_OPTION_ENCRYPTED" - Include client-side + // encrypted content only. + // "CLIENT_SIDE_ENCRYPTED_OPTION_UNENCRYPTED" - Include unencrypted + // content only. + ClientSideEncryptedOption string `json:"clientSideEncryptedOption,omitempty"` + // ExcludeDrafts: Set to **true** to exclude drafts. ExcludeDrafts bool `json:"excludeDrafts,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExcludeDrafts") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ClientSideEncryptedOption") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExcludeDrafts") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ClientSideEncryptedOption") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } diff --git a/workloadmanager/v1/workloadmanager-api.json b/workloadmanager/v1/workloadmanager-api.json index 18b9cd34225..031dcd83edc 100644 --- a/workloadmanager/v1/workloadmanager-api.json +++ b/workloadmanager/v1/workloadmanager-api.json @@ -288,6 +288,213 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "executions": { + "methods": { + "get": { + "description": "Gets details of a single Execution.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.evaluations.executions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Execution" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Executions in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.evaluations.executions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource prefix of the Execution using the form: 'projects/{project}/locations/{location}/evaluations/{evaluation}'", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/executions", + "response": { + "$ref": "ListExecutionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "run": { + "description": "Creates a new Execution in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions:run", + "httpMethod": "POST", + "id": "workloadmanager.projects.locations.evaluations.executions.run", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Execution using the form: 'projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}'", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}/executions:run", + "request": { + "$ref": "RunEvaluationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "results": { + "methods": { + "list": { + "description": "List the running result of a single Execution.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}/results", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.evaluations.executions.results.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The execution results. Format: {parent}/evaluations/*/executions/*/results", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/results", + "response": { + "$ref": "ListExecutionResultsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "scannedResources": { + "methods": { + "list": { + "description": "List all scanned resources for a single Execution.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}/scannedResources", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.evaluations.executions.scannedResources.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. parent for ListScannedResourcesRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", + "required": true, + "type": "string" + }, + "rule": { + "description": "rule name", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/scannedResources", + "response": { + "$ref": "ListScannedResourcesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } } }, "insights": { @@ -444,13 +651,58 @@ ] } } + }, + "rules": { + "methods": { + "list": { + "description": "Lists rules in a given project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/rules", + "httpMethod": "GET", + "id": "workloadmanager.projects.locations.rules.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filter based on primary_category, secondary_category", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/rules", + "response": { + "$ref": "ListRulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } } } }, - "revision": "20230308", + "revision": "20230406", "rootUrl": "https://workloadmanager.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -514,6 +766,10 @@ "readOnly": true, "type": "array" }, + "schedule": { + "description": "crontab format schedule for scheduled evaluation, example: 0 */3 * * *", + "type": "string" + }, "updateTime": { "description": "Output only. [Output only] Update time stamp", "format": "google-datetime", @@ -523,6 +779,109 @@ }, "type": "object" }, + "Execution": { + "description": "Message describing Execution object", + "id": "Execution", + "properties": { + "endTime": { + "description": "Output only. [Output only] End time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "evaluationId": { + "description": "Output only. [Output only] Evaluation ID", + "readOnly": true, + "type": "string" + }, + "inventoryTime": { + "description": "Output only. [Output only] Inventory time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs", + "type": "object" + }, + "name": { + "description": "The name of execution resource. The format is projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}", + "type": "string" + }, + "runType": { + "description": "type represent whether the execution executed directly by user or scheduled according evaluation.schedule field.", + "enum": [ + "TYPE_UNSPECIFIED", + "ONE_TIME", + "SCHEDULED" + ], + "enumDescriptions": [ + "type of execution is unspecified", + "type of execution is one time", + "type of execution is scheduled" + ], + "type": "string" + }, + "startTime": { + "description": "Output only. [Output only] Start time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. [Output only] State", + "enum": [ + "STATE_UNSPECIFIED", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "state of execution is unspecified", + "the execution is running in backend service", + "the execution run success", + "the execution run failed" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ExecutionResult": { + "description": "Message describing the result of an execution", + "id": "ExecutionResult", + "properties": { + "documentationUrl": { + "description": "the document url of the rule", + "type": "string" + }, + "resource": { + "$ref": "Resource", + "description": "the violate resource" + }, + "rule": { + "description": "the rule which violate in execution", + "type": "string" + }, + "severity": { + "description": "severity of violation", + "type": "string" + }, + "violationDetails": { + "$ref": "ViolationDetails", + "description": "the details of violation in result" + }, + "violationMessage": { + "description": "the violation message of an execution", + "type": "string" + } + }, + "type": "object" + }, "GceInstanceFilter": { "description": "Message describing compute engine instance filter", "id": "GceInstanceFilter", @@ -583,6 +942,49 @@ }, "type": "object" }, + "ListExecutionResultsResponse": { + "description": "Message for response of list execution results", + "id": "ListExecutionResultsResponse", + "properties": { + "executionResults": { + "description": "The versions from the specified publisher.", + "items": { + "$ref": "ExecutionResult" + }, + "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" + } + }, + "type": "object" + }, + "ListExecutionsResponse": { + "description": "Message for response to listing Executions", + "id": "ListExecutionsResponse", + "properties": { + "executions": { + "description": "The list of Execution", + "items": { + "$ref": "Execution" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -619,6 +1021,42 @@ }, "type": "object" }, + "ListRulesResponse": { + "description": "Mesesage of response of list rules", + "id": "ListRulesResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "rules": { + "description": "all rules in response", + "items": { + "$ref": "Rule" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListScannedResourcesResponse": { + "description": "Message for response to list scanned resources", + "id": "ListScannedResourcesResponse", + "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" + }, + "scannedResources": { + "description": "All scanned resources in response", + "items": { + "$ref": "ScannedResource" + }, + "type": "array" + } + }, + "type": "object" + }, "Location": { "description": "A resource that represents Google Cloud Platform location.", "id": "Location", @@ -732,6 +1170,25 @@ }, "type": "object" }, + "Resource": { + "description": "Message represent resource in execution result", + "id": "Resource", + "properties": { + "name": { + "description": "the name of the resource", + "type": "string" + }, + "serviceAccount": { + "description": "the service account accosiate with resource", + "type": "string" + }, + "type": { + "description": "the type of reresource", + "type": "string" + } + }, + "type": "object" + }, "ResourceFilter": { "description": "Message describing resource filters", "id": "ResourceFilter", @@ -794,6 +1251,73 @@ }, "type": "object" }, + "Rule": { + "description": "Message represent a rule", + "id": "Rule", + "properties": { + "description": { + "description": "descrite rule in plain language", + "type": "string" + }, + "displayName": { + "description": "the name display in UI", + "type": "string" + }, + "errorMessage": { + "description": "the message template for rule", + "type": "string" + }, + "name": { + "description": "rule name", + "type": "string" + }, + "primaryCategory": { + "description": "the primary category", + "type": "string" + }, + "remediation": { + "description": "the remediation for the rule", + "type": "string" + }, + "revisionId": { + "description": "Output only. the version of the rule", + "readOnly": true, + "type": "string" + }, + "secondaryCategory": { + "description": "the secondary category", + "type": "string" + }, + "severity": { + "description": "the severity of the rule", + "type": "string" + }, + "uri": { + "description": "the docuement url for the rule", + "type": "string" + } + }, + "type": "object" + }, + "RunEvaluationRequest": { + "description": "Message for creating a Execution", + "id": "RunEvaluationRequest", + "properties": { + "execution": { + "$ref": "Execution", + "description": "Required. The resource being created" + }, + "executionId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and execution_id from the method_signature of Create RPC", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + } + }, + "type": "object" + }, "SapDiscovery": { "description": "The schema of SAP system discovery data.", "id": "SapDiscovery", @@ -890,6 +1414,26 @@ "description": "ComputeInstance, ComputeDisk, VPC, Bare Metal server, etc.", "type": "string" }, + "resourceState": { + "description": "Indicates whether this is a new, updated, or missing resource.", + "enum": [ + "RESOURCE_STATE_UNSPECIFIED", + "ADDED", + "UPDATED", + "REMOVED", + "REPLACED", + "MISSING" + ], + "enumDescriptions": [ + "Undefined resource state", + "Resource was added this cycle", + "Resource already discovered, just updated this cycle", + "Resource already discovered, but has been explicitly removed this cycle", + "Resource already discovered, but has been replaced by a new resource this cycle", + "Resource already discovered, but is missing or unresponsive this cycle" + ], + "type": "string" + }, "resourceType": { "description": "The type of this resource.", "enum": [ @@ -966,6 +1510,17 @@ }, "type": "object" }, + "ScannedResource": { + "description": "Message of scanned resource", + "id": "ScannedResource", + "properties": { + "resource": { + "description": "resource name", + "type": "string" + } + }, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -993,6 +1548,28 @@ }, "type": "object" }, + "ViolationDetails": { + "description": "Message describing the violdation in execution result", + "id": "ViolationDetails", + "properties": { + "asset": { + "description": "the name of asset", + "type": "string" + }, + "observed": { + "additionalProperties": { + "type": "string" + }, + "description": "observed", + "type": "object" + }, + "serviceAccount": { + "description": "the service account associate with resource", + "type": "string" + } + }, + "type": "object" + }, "WriteInsightRequest": { "description": "Request for sending the data insights.", "id": "WriteInsightRequest", diff --git a/workloadmanager/v1/workloadmanager-gen.go b/workloadmanager/v1/workloadmanager-gen.go index 92554d64b30..88f4968c236 100644 --- a/workloadmanager/v1/workloadmanager-gen.go +++ b/workloadmanager/v1/workloadmanager-gen.go @@ -155,6 +155,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Evaluations = NewProjectsLocationsEvaluationsService(s) rs.Insights = NewProjectsLocationsInsightsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.Rules = NewProjectsLocationsRulesService(s) return rs } @@ -166,15 +167,53 @@ type ProjectsLocationsService struct { Insights *ProjectsLocationsInsightsService Operations *ProjectsLocationsOperationsService + + Rules *ProjectsLocationsRulesService } func NewProjectsLocationsEvaluationsService(s *Service) *ProjectsLocationsEvaluationsService { rs := &ProjectsLocationsEvaluationsService{s: s} + rs.Executions = NewProjectsLocationsEvaluationsExecutionsService(s) return rs } type ProjectsLocationsEvaluationsService struct { s *Service + + Executions *ProjectsLocationsEvaluationsExecutionsService +} + +func NewProjectsLocationsEvaluationsExecutionsService(s *Service) *ProjectsLocationsEvaluationsExecutionsService { + rs := &ProjectsLocationsEvaluationsExecutionsService{s: s} + rs.Results = NewProjectsLocationsEvaluationsExecutionsResultsService(s) + rs.ScannedResources = NewProjectsLocationsEvaluationsExecutionsScannedResourcesService(s) + return rs +} + +type ProjectsLocationsEvaluationsExecutionsService struct { + s *Service + + Results *ProjectsLocationsEvaluationsExecutionsResultsService + + ScannedResources *ProjectsLocationsEvaluationsExecutionsScannedResourcesService +} + +func NewProjectsLocationsEvaluationsExecutionsResultsService(s *Service) *ProjectsLocationsEvaluationsExecutionsResultsService { + rs := &ProjectsLocationsEvaluationsExecutionsResultsService{s: s} + return rs +} + +type ProjectsLocationsEvaluationsExecutionsResultsService struct { + s *Service +} + +func NewProjectsLocationsEvaluationsExecutionsScannedResourcesService(s *Service) *ProjectsLocationsEvaluationsExecutionsScannedResourcesService { + rs := &ProjectsLocationsEvaluationsExecutionsScannedResourcesService{s: s} + return rs +} + +type ProjectsLocationsEvaluationsExecutionsScannedResourcesService struct { + s *Service } func NewProjectsLocationsInsightsService(s *Service) *ProjectsLocationsInsightsService { @@ -195,6 +234,15 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsRulesService(s *Service) *ProjectsLocationsRulesService { + rs := &ProjectsLocationsRulesService{s: s} + return rs +} + +type ProjectsLocationsRulesService struct { + s *Service +} + // CancelOperationRequest: The request message for // Operations.CancelOperation. type CancelOperationRequest struct { @@ -241,6 +289,10 @@ type Evaluation struct { // exist. RuleVersions []string `json:"ruleVersions,omitempty"` + // Schedule: crontab format schedule for scheduled evaluation, example: + // 0 */3 * * * + Schedule string `json:"schedule,omitempty"` + // UpdateTime: Output only. [Output only] Update time stamp UpdateTime string `json:"updateTime,omitempty"` @@ -271,6 +323,117 @@ func (s *Evaluation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Execution: Message describing Execution object +type Execution struct { + // EndTime: Output only. [Output only] End time stamp + EndTime string `json:"endTime,omitempty"` + + // EvaluationId: Output only. [Output only] Evaluation ID + EvaluationId string `json:"evaluationId,omitempty"` + + // InventoryTime: Output only. [Output only] Inventory time stamp + InventoryTime string `json:"inventoryTime,omitempty"` + + // Labels: Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + + // Name: The name of execution resource. The format is + // projects/{project}/locations/{location}/evaluations/{evaluation}/execu + // tions/{execution} + Name string `json:"name,omitempty"` + + // RunType: type represent whether the execution executed directly by + // user or scheduled according evaluation.schedule field. + // + // Possible values: + // "TYPE_UNSPECIFIED" - type of execution is unspecified + // "ONE_TIME" - type of execution is one time + // "SCHEDULED" - type of execution is scheduled + RunType string `json:"runType,omitempty"` + + // StartTime: Output only. [Output only] Start time stamp + StartTime string `json:"startTime,omitempty"` + + // State: Output only. [Output only] State + // + // Possible values: + // "STATE_UNSPECIFIED" - state of execution is unspecified + // "RUNNING" - the execution is running in backend service + // "SUCCEEDED" - the execution run success + // "FAILED" - the execution run failed + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Execution) MarshalJSON() ([]byte, error) { + type NoMethod Execution + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExecutionResult: Message describing the result of an execution +type ExecutionResult struct { + // DocumentationUrl: the document url of the rule + DocumentationUrl string `json:"documentationUrl,omitempty"` + + // Resource: the violate resource + Resource *Resource `json:"resource,omitempty"` + + // Rule: the rule which violate in execution + Rule string `json:"rule,omitempty"` + + // Severity: severity of violation + Severity string `json:"severity,omitempty"` + + // ViolationDetails: the details of violation in result + ViolationDetails *ViolationDetails `json:"violationDetails,omitempty"` + + // ViolationMessage: the violation message of an execution + ViolationMessage string `json:"violationMessage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DocumentationUrl") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DocumentationUrl") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ExecutionResult) MarshalJSON() ([]byte, error) { + type NoMethod ExecutionResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GceInstanceFilter: Message describing compute engine instance filter type GceInstanceFilter struct { // ServiceAccounts: Service account of compute engine @@ -376,6 +539,84 @@ func (s *ListEvaluationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListExecutionResultsResponse: Message for response of list execution +// results +type ListExecutionResultsResponse struct { + // ExecutionResults: The versions from the specified publisher. + ExecutionResults []*ExecutionResult `json:"executionResults,omitempty"` + + // NextPageToken: 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 `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ExecutionResults") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExecutionResults") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListExecutionResultsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListExecutionResultsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListExecutionsResponse: Message for response to listing Executions +type ListExecutionsResponse struct { + // Executions: The list of Execution + Executions []*Execution `json:"executions,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Executions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Executions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListExecutionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListExecutionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for // Locations.ListLocations. type ListLocationsResponse struct { @@ -450,6 +691,80 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListRulesResponse: Mesesage of response of list rules +type ListRulesResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rules: all rules in response + Rules []*Rule `json:"rules,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListRulesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListRulesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListScannedResourcesResponse: Message for response to list scanned +// resources +type ListScannedResourcesResponse struct { + // NextPageToken: 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 `json:"nextPageToken,omitempty"` + + // ScannedResources: All scanned resources in response + ScannedResources []*ScannedResource `json:"scannedResources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListScannedResourcesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListScannedResourcesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Location: A resource that represents Google Cloud Platform location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby @@ -614,6 +929,40 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Resource: Message represent resource in execution result +type Resource struct { + // Name: the name of the resource + Name string `json:"name,omitempty"` + + // ServiceAccount: the service account accosiate with resource + ServiceAccount string `json:"serviceAccount,omitempty"` + + // Type: the type of reresource + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Resource) MarshalJSON() ([]byte, error) { + type NoMethod Resource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ResourceFilter: Message describing resource filters type ResourceFilter struct { // GceInstanceFilter: Filter compute engine resource @@ -692,25 +1041,127 @@ func (s *ResourceStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SapDiscovery: The schema of SAP system discovery data. -type SapDiscovery struct { - // ApplicationLayer: An SAP system may run without an application layer. - ApplicationLayer *SapDiscoveryComponent `json:"applicationLayer,omitempty"` +// Rule: Message represent a rule +type Rule struct { + // Description: descrite rule in plain language + Description string `json:"description,omitempty"` - // DatabaseLayer: An SAP System must have a database. - DatabaseLayer *SapDiscoveryComponent `json:"databaseLayer,omitempty"` + // DisplayName: the name display in UI + DisplayName string `json:"displayName,omitempty"` - // Metadata: The metadata for SAP system discovery data. - Metadata *SapDiscoveryMetadata `json:"metadata,omitempty"` + // ErrorMessage: the message template for rule + ErrorMessage string `json:"errorMessage,omitempty"` - // SystemId: A combination of database SID, database instance URI and - // tenant DB name to make a unique identifier per-system. - SystemId string `json:"systemId,omitempty"` + // Name: rule name + Name string `json:"name,omitempty"` - // UpdateTime: Unix timestamp this system has been updated last. - UpdateTime string `json:"updateTime,omitempty"` + // PrimaryCategory: the primary category + PrimaryCategory string `json:"primaryCategory,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplicationLayer") to + // Remediation: the remediation for the rule + Remediation string `json:"remediation,omitempty"` + + // RevisionId: Output only. the version of the rule + RevisionId string `json:"revisionId,omitempty"` + + // SecondaryCategory: the secondary category + SecondaryCategory string `json:"secondaryCategory,omitempty"` + + // Severity: the severity of the rule + Severity string `json:"severity,omitempty"` + + // Uri: the docuement url for the rule + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Rule) MarshalJSON() ([]byte, error) { + type NoMethod Rule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunEvaluationRequest: Message for creating a Execution +type RunEvaluationRequest struct { + // Execution: Required. The resource being created + Execution *Execution `json:"execution,omitempty"` + + // ExecutionId: Required. Id of the requesting object If auto-generating + // Id server-side, remove this field and execution_id from the + // method_signature of Create RPC + ExecutionId string `json:"executionId,omitempty"` + + // RequestId: Optional. An optional request ID to identify requests. + // Specify a unique request ID so that if you must retry your request, + // the server will know to ignore the request if it has already been + // completed. The server will guarantee that for at least 60 minutes + // since the first request. For example, consider a situation where you + // make an initial request and the request times out. If you make the + // request again with the same request ID, the server can check if + // original operation with the same request ID was received, and if so, + // will ignore the second request. This prevents clients from + // accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Execution") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Execution") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RunEvaluationRequest) MarshalJSON() ([]byte, error) { + type NoMethod RunEvaluationRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SapDiscovery: The schema of SAP system discovery data. +type SapDiscovery struct { + // ApplicationLayer: An SAP system may run without an application layer. + ApplicationLayer *SapDiscoveryComponent `json:"applicationLayer,omitempty"` + + // DatabaseLayer: An SAP System must have a database. + DatabaseLayer *SapDiscoveryComponent `json:"databaseLayer,omitempty"` + + // Metadata: The metadata for SAP system discovery data. + Metadata *SapDiscoveryMetadata `json:"metadata,omitempty"` + + // SystemId: A combination of database SID, database instance URI and + // tenant DB name to make a unique identifier per-system. + SystemId string `json:"systemId,omitempty"` + + // UpdateTime: Unix timestamp this system has been updated last. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApplicationLayer") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -825,6 +1276,21 @@ type SapDiscoveryResource struct { // etc. ResourceKind string `json:"resourceKind,omitempty"` + // ResourceState: Indicates whether this is a new, updated, or missing + // resource. + // + // Possible values: + // "RESOURCE_STATE_UNSPECIFIED" - Undefined resource state + // "ADDED" - Resource was added this cycle + // "UPDATED" - Resource already discovered, just updated this cycle + // "REMOVED" - Resource already discovered, but has been explicitly + // removed this cycle + // "REPLACED" - Resource already discovered, but has been replaced by + // a new resource this cycle + // "MISSING" - Resource already discovered, but is missing or + // unresponsive this cycle + ResourceState string `json:"resourceState,omitempty"` + // ResourceType: The type of this resource. // // Possible values: @@ -936,6 +1402,34 @@ func (s *SapValidationValidationDetail) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ScannedResource: Message of scanned resource +type ScannedResource struct { + // Resource: resource name + Resource string `json:"resource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Resource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Resource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ScannedResource) MarshalJSON() ([]byte, error) { + type NoMethod ScannedResource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is // suitable for different programming environments, including REST APIs // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each @@ -980,6 +1474,41 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ViolationDetails: Message describing the violdation in execution +// result +type ViolationDetails struct { + // Asset: the name of asset + Asset string `json:"asset,omitempty"` + + // Observed: observed + Observed map[string]string `json:"observed,omitempty"` + + // ServiceAccount: the service account associate with resource + ServiceAccount string `json:"serviceAccount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Asset") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ViolationDetails) MarshalJSON() ([]byte, error) { + type NoMethod ViolationDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // WriteInsightRequest: Request for sending the data insights. type WriteInsightRequest struct { // Insight: Required. The metrics data details. @@ -1692,14 +2221,921 @@ func (c *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) ( // "name": { // "description": "Required. Name of the resource", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Evaluation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.evaluations.list": + +type ProjectsLocationsEvaluationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Evaluations in a given project and location. +// +// - parent: Parent value for ListEvaluationsRequest. +func (r *ProjectsLocationsEvaluationsService) List(parent string) *ProjectsLocationsEvaluationsListCall { + c := &ProjectsLocationsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsEvaluationsListCall) Filter(filter string) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results +func (c *ProjectsLocationsEvaluationsListCall) OrderBy(orderBy string) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEvaluationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.evaluations.list" call. +// Exactly one of *ListEvaluationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListEvaluationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*ListEvaluationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListEvaluationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Evaluations in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.evaluations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Hint for how to order the results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListEvaluationsRequest", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/evaluations", + // "response": { + // "$ref": "ListEvaluationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsEvaluationsListCall) Pages(ctx context.Context, f func(*ListEvaluationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workloadmanager.projects.locations.evaluations.executions.get": + +type ProjectsLocationsEvaluationsExecutionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Execution. +// +// - name: Name of the resource. +func (r *ProjectsLocationsEvaluationsExecutionsService) Get(name string) *ProjectsLocationsEvaluationsExecutionsGetCall { + c := &ProjectsLocationsEvaluationsExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsExecutionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.evaluations.executions.get" call. +// Exactly one of *Execution or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Execution.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Do(opts ...googleapi.CallOption) (*Execution, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Execution{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single Execution.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.evaluations.executions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Execution" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.evaluations.executions.list": + +type ProjectsLocationsEvaluationsExecutionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Executions in a given project and location. +// +// - parent: The resource prefix of the Execution using the form: +// 'projects/{project}/locations/{location}/evaluations/{evaluation}'. +func (r *ProjectsLocationsEvaluationsExecutionsService) List(parent string) *ProjectsLocationsEvaluationsExecutionsListCall { + c := &ProjectsLocationsEvaluationsExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsEvaluationsExecutionsListCall) Filter(filter string) *ProjectsLocationsEvaluationsExecutionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsEvaluationsExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsEvaluationsExecutionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsEvaluationsExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsExecutionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsEvaluationsExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsExecutionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEvaluationsExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsEvaluationsExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsExecutionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEvaluationsExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEvaluationsExecutionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsExecutionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.evaluations.executions.list" call. +// Exactly one of *ListExecutionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListExecutionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsExecutionsListCall) Do(opts ...googleapi.CallOption) (*ListExecutionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListExecutionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Executions in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.evaluations.executions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource prefix of the Execution using the form: 'projects/{project}/locations/{location}/evaluations/{evaluation}'", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/executions", + // "response": { + // "$ref": "ListExecutionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsEvaluationsExecutionsListCall) Pages(ctx context.Context, f func(*ListExecutionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workloadmanager.projects.locations.evaluations.executions.run": + +type ProjectsLocationsEvaluationsExecutionsRunCall struct { + s *Service + name string + runevaluationrequest *RunEvaluationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Run: Creates a new Execution in a given project and location. +// +// - name: The resource name of the Execution using the form: +// 'projects/{project}/locations/{location}/evaluations/{evaluation}/ex +// ecutions/{execution}'. +func (r *ProjectsLocationsEvaluationsExecutionsService) Run(name string, runevaluationrequest *RunEvaluationRequest) *ProjectsLocationsEvaluationsExecutionsRunCall { + c := &ProjectsLocationsEvaluationsExecutionsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.runevaluationrequest = runevaluationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEvaluationsExecutionsRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsRunCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEvaluationsExecutionsRunCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsRunCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEvaluationsExecutionsRunCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsExecutionsRunCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.runevaluationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/executions:run") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.evaluations.executions.run" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsExecutionsRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Execution in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions:run", + // "httpMethod": "POST", + // "id": "workloadmanager.projects.locations.evaluations.executions.run", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Execution using the form: 'projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}'", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}/executions:run", + // "request": { + // "$ref": "RunEvaluationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workloadmanager.projects.locations.evaluations.executions.results.list": + +type ProjectsLocationsEvaluationsExecutionsResultsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List the running result of a single Execution. +// +// - parent: The execution results. Format: +// {parent}/evaluations/*/executions/*/results. +func (r *ProjectsLocationsEvaluationsExecutionsResultsService) List(parent string) *ProjectsLocationsEvaluationsExecutionsResultsListCall { + c := &ProjectsLocationsEvaluationsExecutionsResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Filter(filter string) *ProjectsLocationsEvaluationsExecutionsResultsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsExecutionsResultsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsExecutionsResultsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsResultsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsExecutionsResultsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsResultsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.evaluations.executions.results.list" call. +// Exactly one of *ListExecutionResultsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListExecutionResultsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Do(opts ...googleapi.CallOption) (*ListExecutionResultsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListExecutionResultsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List the running result of a single Execution.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}/results", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.evaluations.executions.results.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filtering results", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The execution results. Format: {parent}/evaluations/*/executions/*/results", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/results", // "response": { - // "$ref": "Evaluation" + // "$ref": "ListExecutionResultsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1708,9 +3144,30 @@ func (c *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) ( } -// method id "workloadmanager.projects.locations.evaluations.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Pages(ctx context.Context, f func(*ListExecutionResultsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsEvaluationsListCall struct { +// method id "workloadmanager.projects.locations.evaluations.executions.scannedResources.list": + +type ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -1719,24 +3176,24 @@ type ProjectsLocationsEvaluationsListCall struct { header_ http.Header } -// List: Lists Evaluations in a given project and location. +// List: List all scanned resources for a single Execution. // -// - parent: Parent value for ListEvaluationsRequest. -func (r *ProjectsLocationsEvaluationsService) List(parent string) *ProjectsLocationsEvaluationsListCall { - c := &ProjectsLocationsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: parent for ListScannedResourcesRequest. +func (r *ProjectsLocationsEvaluationsExecutionsScannedResourcesService) List(parent string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall { + c := &ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filtering results -func (c *ProjectsLocationsEvaluationsListCall) Filter(filter string) *ProjectsLocationsEvaluationsListCall { +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Filter(filter string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": Hint for how to order -// the results -func (c *ProjectsLocationsEvaluationsListCall) OrderBy(orderBy string) *ProjectsLocationsEvaluationsListCall { +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) OrderBy(orderBy string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -1744,22 +3201,28 @@ func (c *ProjectsLocationsEvaluationsListCall) OrderBy(orderBy string) *Projects // PageSize sets the optional parameter "pageSize": Requested page size. // Server may return fewer items than requested. If unspecified, server // will pick an appropriate default. -func (c *ProjectsLocationsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsListCall { +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A token // identifying a page of results the server should return. -func (c *ProjectsLocationsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsListCall { +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// Rule sets the optional parameter "rule": rule name +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Rule(rule string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall { + c.urlParams_.Set("rule", rule) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsListCall { +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1769,7 +3232,7 @@ func (c *ProjectsLocationsEvaluationsListCall) Fields(s ...googleapi.Field) *Pro // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsListCall { +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall { c.ifNoneMatch_ = entityTag return c } @@ -1777,21 +3240,21 @@ func (c *ProjectsLocationsEvaluationsListCall) IfNoneMatch(entityTag string) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsListCall { +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsEvaluationsListCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEvaluationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1804,7 +3267,7 @@ func (c *ProjectsLocationsEvaluationsListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/scannedResources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1817,14 +3280,14 @@ func (c *ProjectsLocationsEvaluationsListCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "workloadmanager.projects.locations.evaluations.list" call. -// Exactly one of *ListEvaluationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListEvaluationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "workloadmanager.projects.locations.evaluations.executions.scannedResources.list" call. +// Exactly one of *ListScannedResourcesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListScannedResourcesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*ListEvaluationsResponse, error) { +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Do(opts ...googleapi.CallOption) (*ListScannedResourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1843,7 +3306,7 @@ func (c *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListEvaluationsResponse{ + ret := &ListScannedResourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1855,10 +3318,10 @@ func (c *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists Evaluations in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations", + // "description": "List all scanned resources for a single Execution.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}/scannedResources", // "httpMethod": "GET", - // "id": "workloadmanager.projects.locations.evaluations.list", + // "id": "workloadmanager.projects.locations.evaluations.executions.scannedResources.list", // "parameterOrder": [ // "parent" // ], @@ -1869,7 +3332,7 @@ func (c *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "orderBy": { - // "description": "Hint for how to order the results", + // "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", // "location": "query", // "type": "string" // }, @@ -1885,16 +3348,21 @@ func (c *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "parent": { - // "description": "Required. Parent value for ListEvaluationsRequest", + // "description": "Required. parent for ListScannedResourcesRequest", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", // "required": true, // "type": "string" + // }, + // "rule": { + // "description": "rule name", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+parent}/evaluations", + // "path": "v1/{+parent}/scannedResources", // "response": { - // "$ref": "ListEvaluationsResponse" + // "$ref": "ListScannedResourcesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1906,7 +3374,7 @@ func (c *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsEvaluationsListCall) Pages(ctx context.Context, f func(*ListEvaluationsResponse) error) error { +func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Pages(ctx context.Context, f func(*ListScannedResourcesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -2707,3 +4175,211 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( c.PageToken(x.NextPageToken) } } + +// method id "workloadmanager.projects.locations.rules.list": + +type ProjectsLocationsRulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists rules in a given project. +// +// - parent: The [project] on which to execute the request. The format +// is: projects/{project_id}/locations/{location} Currently, the +// pre-defined rules are global available to all projects and all +// regions. +func (r *ProjectsLocationsRulesService) List(parent string) *ProjectsLocationsRulesListCall { + c := &ProjectsLocationsRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter based on +// primary_category, secondary_category +func (c *ProjectsLocationsRulesListCall) Filter(filter string) *ProjectsLocationsRulesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsRulesListCall) PageSize(pageSize int64) *ProjectsLocationsRulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsRulesListCall) PageToken(pageToken string) *ProjectsLocationsRulesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRulesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRulesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRulesListCall) Context(ctx context.Context) *ProjectsLocationsRulesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRulesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRulesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rules") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workloadmanager.projects.locations.rules.list" call. +// Exactly one of *ListRulesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListRulesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRulesListCall) Do(opts ...googleapi.CallOption) (*ListRulesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListRulesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists rules in a given project.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/rules", + // "httpMethod": "GET", + // "id": "workloadmanager.projects.locations.rules.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filter based on primary_category, secondary_category", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/rules", + // "response": { + // "$ref": "ListRulesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsRulesListCall) Pages(ctx context.Context, f func(*ListRulesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +}