diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index 428c93ca6d1..ee227a6d862 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -1212,6 +1212,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "deprecate": { + "description": "Deprecates a single CustomConnectorVersion.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customConnectors/{customConnectorsId}/customConnectorVersions/{customConnectorVersionsId}:deprecate", + "httpMethod": "POST", + "id": "connectors.projects.locations.customConnectors.customConnectorVersions.deprecate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the form: `projects/{project}/locations/{location}/customConnectors/{custom_connector}/customConnectorVersions/{custom_connector_version}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/customConnectors/[^/]+/customConnectorVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:deprecate", + "request": { + "$ref": "DeprecateCustomConnectorVersionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } } @@ -2399,7 +2427,7 @@ } } }, - "revision": "20240415", + "revision": "20240504", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -3422,6 +3450,22 @@ "enabled": { "description": "Enabled represents whether logging is enabled or not for a connection.", "type": "boolean" + }, + "level": { + "description": "Optional. Log configuration level.", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "ERROR", + "INFO", + "DEBUG" + ], + "enumDescriptions": [ + "Log level unspecified.", + "Only error logs are enabled.", + "Info and error logs are enabled.", + "Debug and high verbosity logs are enabled." + ], + "type": "string" } }, "type": "object" @@ -3654,6 +3698,12 @@ }, "type": "object" }, + "DeprecateCustomConnectorVersionRequest": { + "description": "Request message for ConnectorsService.DeprecateCustomConnectorVersion", + "id": "DeprecateCustomConnectorVersionRequest", + "properties": {}, + "type": "object" + }, "Destination": { "id": "Destination", "properties": { @@ -3860,6 +3910,10 @@ "description": "Optional. Description of the resource.", "type": "string" }, + "endpointGlobalAccess": { + "description": "Optional. The Private Service Connect Connection Endpoint Global Access. https://cloud.google.com/vpc/docs/about-accessing-vpc-hosted-services-endpoints#global-access", + "type": "boolean" + }, "endpointIp": { "description": "Output only. The Private Service Connect connection endpoint ip", "readOnly": true, diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 615860d26b0..0b1e179b38d 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -1285,6 +1285,14 @@ type ConnectorsLogConfig struct { // Enabled: Enabled represents whether logging is enabled or not for a // connection. Enabled bool `json:"enabled,omitempty"` + // Level: Optional. Log configuration level. + // + // Possible values: + // "LOG_LEVEL_UNSPECIFIED" - Log level unspecified. + // "ERROR" - Only error logs are enabled. + // "INFO" - Info and error logs are enabled. + // "DEBUG" - Debug and high verbosity logs are enabled. + Level string `json:"level,omitempty"` // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -1542,6 +1550,11 @@ func (s *DenyMaintenancePeriod) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// DeprecateCustomConnectorVersionRequest: Request message for +// ConnectorsService.DeprecateCustomConnectorVersion +type DeprecateCustomConnectorVersionRequest struct { +} + type Destination struct { // Host: For publicly routable host. Host string `json:"host,omitempty"` @@ -1776,6 +1789,10 @@ type EndpointAttachment struct { CreateTime string `json:"createTime,omitempty"` // Description: Optional. Description of the resource. Description string `json:"description,omitempty"` + // EndpointGlobalAccess: Optional. The Private Service Connect Connection + // Endpoint Global Access. + // https://cloud.google.com/vpc/docs/about-accessing-vpc-hosted-services-endpoints#global-access + EndpointGlobalAccess bool `json:"endpointGlobalAccess,omitempty"` // EndpointIp: Output only. The Private Service Connect connection endpoint ip EndpointIp string `json:"endpointIp,omitempty"` // Labels: Optional. Resource labels to represent user-provided metadata. Refer @@ -9077,6 +9094,109 @@ func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeleteCall) Do( return ret, nil } +type ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall struct { + s *Service + name string + deprecatecustomconnectorversionrequest *DeprecateCustomConnectorVersionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Deprecate: Deprecates a single CustomConnectorVersion. +// +// - name: Resource name of the form: +// `projects/{project}/locations/{location}/customConnectors/{custom_connector +// }/customConnectorVersions/{custom_connector_version}`. +func (r *ProjectsLocationsCustomConnectorsCustomConnectorVersionsService) Deprecate(name string, deprecatecustomconnectorversionrequest *DeprecateCustomConnectorVersionRequest) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall { + c := &ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.deprecatecustomconnectorversionrequest = deprecatecustomconnectorversionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall) Context(ctx context.Context) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecatecustomconnectorversionrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deprecate") + 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 "connectors.projects.locations.customConnectors.customConnectorVersions.deprecate" call. +// 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 *ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall) 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 +} + type ProjectsLocationsEndpointAttachmentsCreateCall struct { s *Service parent string