diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index 6e1ddb2e8c9..50bb4e031d3 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -719,24 +719,6 @@ "https://www.googleapis.com/auth/analytics.edit" ] }, - "createSubproperty": { - "description": "Create a subproperty and a subproperty event filter that applies to the created subproperty.", - "flatPath": "v1alpha/properties:createSubproperty", - "httpMethod": "POST", - "id": "analyticsadmin.properties.createSubproperty", - "parameterOrder": [], - "parameters": {}, - "path": "v1alpha/properties:createSubproperty", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest" - }, - "response": { - "$ref": "GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/analytics.edit" - ] - }, "delete": { "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not a GA4 Property.", "flatPath": "v1alpha/properties/{propertiesId}", @@ -1016,6 +998,24 @@ "https://www.googleapis.com/auth/analytics.edit" ] }, + "provisionSubproperty": { + "description": "Create a subproperty and a subproperty event filter that applies to the created subproperty.", + "flatPath": "v1alpha/properties:provisionSubproperty", + "httpMethod": "POST", + "id": "analyticsadmin.properties.provisionSubproperty", + "parameterOrder": [], + "parameters": {}, + "path": "v1alpha/properties:provisionSubproperty", + "request": { + "$ref": "GoogleAnalyticsAdminV1alphaProvisionSubpropertyRequest" + }, + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaProvisionSubpropertyResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + }, "runAccessReport": { "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", "flatPath": "v1alpha/properties/{propertiesId}:runAccessReport", @@ -4886,7 +4886,7 @@ } } }, - "revision": "20240728", + "revision": "20240731", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { @@ -6659,36 +6659,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest": { - "description": "Request message for CreateSubproperty RPC.", - "id": "GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest", - "properties": { - "subproperty": { - "$ref": "GoogleAnalyticsAdminV1alphaProperty", - "description": "Required. The subproperty to create." - }, - "subpropertyEventFilter": { - "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter", - "description": "Optional. The subproperty event filter to create on an ordinary property." - } - }, - "type": "object" - }, - "GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse": { - "description": "Response message for CreateSubproperty RPC.", - "id": "GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse", - "properties": { - "subproperty": { - "$ref": "GoogleAnalyticsAdminV1alphaProperty", - "description": "The created subproperty." - }, - "subpropertyEventFilter": { - "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter", - "description": "The created subproperty event filter." - } - }, - "type": "object" - }, "GoogleAnalyticsAdminV1alphaCustomDimension": { "description": "A definition for a CustomDimension.", "id": "GoogleAnalyticsAdminV1alphaCustomDimension", @@ -8532,6 +8502,36 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaProvisionSubpropertyRequest": { + "description": "Request message for CreateSubproperty RPC.", + "id": "GoogleAnalyticsAdminV1alphaProvisionSubpropertyRequest", + "properties": { + "subproperty": { + "$ref": "GoogleAnalyticsAdminV1alphaProperty", + "description": "Required. The subproperty to create." + }, + "subpropertyEventFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter", + "description": "Optional. The subproperty event filter to create on an ordinary property." + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaProvisionSubpropertyResponse": { + "description": "Response message for ProvisionSubproperty RPC.", + "id": "GoogleAnalyticsAdminV1alphaProvisionSubpropertyResponse", + "properties": { + "subproperty": { + "$ref": "GoogleAnalyticsAdminV1alphaProperty", + "description": "The created subproperty." + }, + "subpropertyEventFilter": { + "$ref": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter", + "description": "The created subproperty event filter." + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest": { "description": "Request message for ReorderEventEditRules RPC.", "id": "GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest", diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index 3b5b75eccc9..bd79cbb1d8e 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -2872,60 +2872,6 @@ func (s GoogleAnalyticsAdminV1alphaCreateRollupPropertyResponse) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest: Request message for -// CreateSubproperty RPC. -type GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest struct { - // Subproperty: Required. The subproperty to create. - Subproperty *GoogleAnalyticsAdminV1alphaProperty `json:"subproperty,omitempty"` - // SubpropertyEventFilter: Optional. The subproperty event filter to create on - // an ordinary property. - SubpropertyEventFilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter `json:"subpropertyEventFilter,omitempty"` - // ForceSendFields is a list of field names (e.g. "Subproperty") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Subproperty") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse: Response message for -// CreateSubproperty RPC. -type GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse struct { - // Subproperty: The created subproperty. - Subproperty *GoogleAnalyticsAdminV1alphaProperty `json:"subproperty,omitempty"` - // SubpropertyEventFilter: The created subproperty event filter. - SubpropertyEventFilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter `json:"subpropertyEventFilter,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Subproperty") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Subproperty") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleAnalyticsAdminV1alphaCustomDimension: A definition for a // CustomDimension. type GoogleAnalyticsAdminV1alphaCustomDimension struct { @@ -5533,6 +5479,60 @@ func (s GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaProvisionSubpropertyRequest: Request message for +// CreateSubproperty RPC. +type GoogleAnalyticsAdminV1alphaProvisionSubpropertyRequest struct { + // Subproperty: Required. The subproperty to create. + Subproperty *GoogleAnalyticsAdminV1alphaProperty `json:"subproperty,omitempty"` + // SubpropertyEventFilter: Optional. The subproperty event filter to create on + // an ordinary property. + SubpropertyEventFilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter `json:"subpropertyEventFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Subproperty") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Subproperty") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleAnalyticsAdminV1alphaProvisionSubpropertyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaProvisionSubpropertyRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaProvisionSubpropertyResponse: Response message +// for ProvisionSubproperty RPC. +type GoogleAnalyticsAdminV1alphaProvisionSubpropertyResponse struct { + // Subproperty: The created subproperty. + Subproperty *GoogleAnalyticsAdminV1alphaProperty `json:"subproperty,omitempty"` + // SubpropertyEventFilter: The created subproperty event filter. + SubpropertyEventFilter *GoogleAnalyticsAdminV1alphaSubpropertyEventFilter `json:"subpropertyEventFilter,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Subproperty") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Subproperty") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleAnalyticsAdminV1alphaProvisionSubpropertyResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaProvisionSubpropertyResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest: Request message for // ReorderEventEditRules RPC. type GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest struct { @@ -8662,102 +8662,6 @@ func (c *PropertiesCreateRollupPropertyCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type PropertiesCreateSubpropertyCall struct { - s *Service - googleanalyticsadminv1alphacreatesubpropertyrequest *GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// CreateSubproperty: Create a subproperty and a subproperty event filter that -// applies to the created subproperty. -func (r *PropertiesService) CreateSubproperty(googleanalyticsadminv1alphacreatesubpropertyrequest *GoogleAnalyticsAdminV1alphaCreateSubpropertyRequest) *PropertiesCreateSubpropertyCall { - c := &PropertiesCreateSubpropertyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googleanalyticsadminv1alphacreatesubpropertyrequest = googleanalyticsadminv1alphacreatesubpropertyrequest - 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 *PropertiesCreateSubpropertyCall) Fields(s ...googleapi.Field) *PropertiesCreateSubpropertyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PropertiesCreateSubpropertyCall) Context(ctx context.Context) *PropertiesCreateSubpropertyCall { - 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 *PropertiesCreateSubpropertyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesCreateSubpropertyCall) 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.googleanalyticsadminv1alphacreatesubpropertyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties:createSubproperty") - 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 "analyticsadmin.properties.createSubproperty" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse.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 *PropertiesCreateSubpropertyCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse, 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 := &GoogleAnalyticsAdminV1alphaCreateSubpropertyResponse{ - 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 PropertiesDeleteCall struct { s *Service name string @@ -9981,6 +9885,102 @@ func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalytics return ret, nil } +type PropertiesProvisionSubpropertyCall struct { + s *Service + googleanalyticsadminv1alphaprovisionsubpropertyrequest *GoogleAnalyticsAdminV1alphaProvisionSubpropertyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ProvisionSubproperty: Create a subproperty and a subproperty event filter +// that applies to the created subproperty. +func (r *PropertiesService) ProvisionSubproperty(googleanalyticsadminv1alphaprovisionsubpropertyrequest *GoogleAnalyticsAdminV1alphaProvisionSubpropertyRequest) *PropertiesProvisionSubpropertyCall { + c := &PropertiesProvisionSubpropertyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googleanalyticsadminv1alphaprovisionsubpropertyrequest = googleanalyticsadminv1alphaprovisionsubpropertyrequest + 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 *PropertiesProvisionSubpropertyCall) Fields(s ...googleapi.Field) *PropertiesProvisionSubpropertyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PropertiesProvisionSubpropertyCall) Context(ctx context.Context) *PropertiesProvisionSubpropertyCall { + 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 *PropertiesProvisionSubpropertyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesProvisionSubpropertyCall) 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.googleanalyticsadminv1alphaprovisionsubpropertyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/properties:provisionSubproperty") + 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 "analyticsadmin.properties.provisionSubproperty" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleAnalyticsAdminV1alphaProvisionSubpropertyResponse.ServerResponse.Heade +// r 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 *PropertiesProvisionSubpropertyCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProvisionSubpropertyResponse, 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 := &GoogleAnalyticsAdminV1alphaProvisionSubpropertyResponse{ + 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 PropertiesRunAccessReportCall struct { s *Service entity string diff --git a/analyticsdata/v1beta/analyticsdata-api.json b/analyticsdata/v1beta/analyticsdata-api.json index 0c18663d768..95d790e218c 100644 --- a/analyticsdata/v1beta/analyticsdata-api.json +++ b/analyticsdata/v1beta/analyticsdata-api.json @@ -440,7 +440,7 @@ } } }, - "revision": "20240512", + "revision": "20240731", "rootUrl": "https://analyticsdata.googleapis.com/", "schemas": { "ActiveMetricRestriction": { @@ -2037,7 +2037,7 @@ "type": "string" }, "metricAggregations": { - "description": "Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to \"RESERVED_(MetricAggregation)\".", + "description": "Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to \"RESERVED_(MetricAggregation)\". Aggregates including both comparisons and multiple date ranges will be aggregated based on the date ranges.", "items": { "enum": [ "METRIC_AGGREGATION_UNSPECIFIED", @@ -2074,7 +2074,7 @@ "type": "string" }, "orderBys": { - "description": "Specifies how rows are ordered in the response.", + "description": "Specifies how rows are ordered in the response. Requests including both comparisons and multiple date ranges will have order bys applied on the comparisons.", "items": { "$ref": "OrderBy" }, diff --git a/analyticsdata/v1beta/analyticsdata-gen.go b/analyticsdata/v1beta/analyticsdata-gen.go index 87fb193141a..367681a8494 100644 --- a/analyticsdata/v1beta/analyticsdata-gen.go +++ b/analyticsdata/v1beta/analyticsdata-gen.go @@ -2358,7 +2358,8 @@ type RunReportRequest struct { Limit int64 `json:"limit,omitempty,string"` // MetricAggregations: Aggregation of metrics. Aggregated metric values will be // shown in rows where the dimension_values are set to - // "RESERVED_(MetricAggregation)". + // "RESERVED_(MetricAggregation)". Aggregates including both comparisons and + // multiple date ranges will be aggregated based on the date ranges. // // Possible values: // "METRIC_AGGREGATION_UNSPECIFIED" - Unspecified operator. @@ -2381,7 +2382,9 @@ type RunReportRequest struct { // pagination parameter, see Pagination // (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). Offset int64 `json:"offset,omitempty,string"` - // OrderBys: Specifies how rows are ordered in the response. + // OrderBys: Specifies how rows are ordered in the response. Requests including + // both comparisons and multiple date ranges will have order bys applied on the + // comparisons. OrderBys []*OrderBy `json:"orderBys,omitempty"` // Property: A Google Analytics GA4 property identifier whose events are // tracked. Specified in the URL path and not the body. To learn more, see diff --git a/cloudfunctions/v1/cloudfunctions-api.json b/cloudfunctions/v1/cloudfunctions-api.json index a4ada7a5717..fb1cb80c53e 100644 --- a/cloudfunctions/v1/cloudfunctions-api.json +++ b/cloudfunctions/v1/cloudfunctions-api.json @@ -552,7 +552,7 @@ } } }, - "revision": "20240711", + "revision": "20240725", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -691,7 +691,7 @@ "type": "string" }, "buildServiceAccount": { - "description": "Optional. A service account the user provides for use with Cloud Build.", + "description": "A service account the user provides for use with Cloud Build. The format of this field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`.", "type": "string" }, "buildWorkerPool": { @@ -1019,6 +1019,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" @@ -1220,6 +1224,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" @@ -1421,6 +1429,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" diff --git a/cloudfunctions/v1/cloudfunctions-gen.go b/cloudfunctions/v1/cloudfunctions-gen.go index 116025015f1..a4c3d131d94 100644 --- a/cloudfunctions/v1/cloudfunctions-gen.go +++ b/cloudfunctions/v1/cloudfunctions-gen.go @@ -449,8 +449,9 @@ type CloudFunction struct { // BuildName: Output only. The Cloud Build Name of the function deployment. // `projects//locations//builds/`. BuildName string `json:"buildName,omitempty"` - // BuildServiceAccount: Optional. A service account the user provides for use - // with Cloud Build. + // BuildServiceAccount: A service account the user provides for use with Cloud + // Build. The format of this field is + // `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. BuildServiceAccount string `json:"buildServiceAccount,omitempty"` // BuildWorkerPool: Name of the Cloud Build Custom Worker Pool that should be // used to build the function. The format of this field is @@ -906,6 +907,8 @@ func (s GoogleCloudFunctionsV2LocationMetadata) MarshalJSON() ([]byte, error) { type GoogleCloudFunctionsV2OperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, @@ -1072,6 +1075,8 @@ func (s GoogleCloudFunctionsV2alphaLocationMetadata) MarshalJSON() ([]byte, erro type GoogleCloudFunctionsV2alphaOperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, @@ -1238,6 +1243,8 @@ func (s GoogleCloudFunctionsV2betaLocationMetadata) MarshalJSON() ([]byte, error type GoogleCloudFunctionsV2betaOperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, diff --git a/cloudfunctions/v2/cloudfunctions-api.json b/cloudfunctions/v2/cloudfunctions-api.json index 4ca9e7e1e14..f98a5e81466 100644 --- a/cloudfunctions/v2/cloudfunctions-api.json +++ b/cloudfunctions/v2/cloudfunctions-api.json @@ -448,7 +448,7 @@ "type": "string" }, "updateMask": { - "description": "The list of fields to be updated. If no field mask is provided, all provided fields in the request will be updated.", + "description": "The list of fields to be updated. If no field mask is provided, all fields will be updated.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -716,7 +716,7 @@ } } }, - "revision": "20240523", + "revision": "20240725", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -850,7 +850,7 @@ "type": "string" }, "serviceAccount": { - "description": "[Preview] Service account to be used for building the container", + "description": "Service account to be used for building the container. The format of this field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`.", "type": "string" }, "source": { @@ -1197,6 +1197,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" @@ -1398,6 +1402,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" @@ -1599,6 +1607,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" diff --git a/cloudfunctions/v2/cloudfunctions-gen.go b/cloudfunctions/v2/cloudfunctions-gen.go index 334a9434606..343b6ddac46 100644 --- a/cloudfunctions/v2/cloudfunctions-gen.go +++ b/cloudfunctions/v2/cloudfunctions-gen.go @@ -442,8 +442,9 @@ type BuildConfig struct { // list of possible choices, see the `gcloud` command reference // (https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). Runtime string `json:"runtime,omitempty"` - // ServiceAccount: [Preview] Service account to be used for building the - // container + // ServiceAccount: Service account to be used for building the container. The + // format of this field is + // `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. ServiceAccount string `json:"serviceAccount,omitempty"` // Source: The location of the function source code. Source *Source `json:"source,omitempty"` @@ -885,6 +886,8 @@ func (s GoogleCloudFunctionsV2LocationMetadata) MarshalJSON() ([]byte, error) { type GoogleCloudFunctionsV2OperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, @@ -1051,6 +1054,8 @@ func (s GoogleCloudFunctionsV2alphaLocationMetadata) MarshalJSON() ([]byte, erro type GoogleCloudFunctionsV2alphaOperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, @@ -1217,6 +1222,8 @@ func (s GoogleCloudFunctionsV2betaLocationMetadata) MarshalJSON() ([]byte, error type GoogleCloudFunctionsV2betaOperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, @@ -3527,8 +3534,7 @@ func (r *ProjectsLocationsFunctionsService) Patch(name string, function *Functio } // UpdateMask sets the optional parameter "updateMask": The list of fields to -// be updated. If no field mask is provided, all provided fields in the request -// will be updated. +// be updated. If no field mask is provided, all fields will be updated. func (c *ProjectsLocationsFunctionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFunctionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index 2b4c9f458c6..a9bb1bb1be1 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -448,7 +448,7 @@ "type": "string" }, "updateMask": { - "description": "The list of fields to be updated. If no field mask is provided, all provided fields in the request will be updated.", + "description": "The list of fields to be updated. If no field mask is provided, all fields will be updated.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -716,7 +716,7 @@ } } }, - "revision": "20240523", + "revision": "20240725", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -850,7 +850,7 @@ "type": "string" }, "serviceAccount": { - "description": "[Preview] Service account to be used for building the container", + "description": "Service account to be used for building the container. The format of this field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`.", "type": "string" }, "source": { @@ -1197,6 +1197,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" @@ -1398,6 +1402,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" @@ -1599,6 +1607,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index 7e6cc755bcf..8747c0e6684 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -442,8 +442,9 @@ type BuildConfig struct { // list of possible choices, see the `gcloud` command reference // (https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). Runtime string `json:"runtime,omitempty"` - // ServiceAccount: [Preview] Service account to be used for building the - // container + // ServiceAccount: Service account to be used for building the container. The + // format of this field is + // `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. ServiceAccount string `json:"serviceAccount,omitempty"` // Source: The location of the function source code. Source *Source `json:"source,omitempty"` @@ -885,6 +886,8 @@ func (s GoogleCloudFunctionsV2LocationMetadata) MarshalJSON() ([]byte, error) { type GoogleCloudFunctionsV2OperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, @@ -1051,6 +1054,8 @@ func (s GoogleCloudFunctionsV2alphaLocationMetadata) MarshalJSON() ([]byte, erro type GoogleCloudFunctionsV2alphaOperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, @@ -1217,6 +1222,8 @@ func (s GoogleCloudFunctionsV2betaLocationMetadata) MarshalJSON() ([]byte, error type GoogleCloudFunctionsV2betaOperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, @@ -3527,8 +3534,7 @@ func (r *ProjectsLocationsFunctionsService) Patch(name string, function *Functio } // UpdateMask sets the optional parameter "updateMask": The list of fields to -// be updated. If no field mask is provided, all provided fields in the request -// will be updated. +// be updated. If no field mask is provided, all fields will be updated. func (c *ProjectsLocationsFunctionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFunctionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index f8bbd7a3bcf..c4afcb7b22c 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -448,7 +448,7 @@ "type": "string" }, "updateMask": { - "description": "The list of fields to be updated. If no field mask is provided, all provided fields in the request will be updated.", + "description": "The list of fields to be updated. If no field mask is provided, all fields will be updated.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -716,7 +716,7 @@ } } }, - "revision": "20240523", + "revision": "20240725", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -850,7 +850,7 @@ "type": "string" }, "serviceAccount": { - "description": "[Preview] Service account to be used for building the container", + "description": "Service account to be used for building the container. The format of this field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`.", "type": "string" }, "source": { @@ -1197,6 +1197,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" @@ -1398,6 +1402,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" @@ -1599,6 +1607,10 @@ "description": "API version used to start the operation.", "type": "string" }, + "buildName": { + "description": "The build name of the function for create and update operations.", + "type": "string" + }, "cancelRequested": { "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "type": "boolean" diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index 6f09051ea36..7ed7f51a475 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -442,8 +442,9 @@ type BuildConfig struct { // list of possible choices, see the `gcloud` command reference // (https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). Runtime string `json:"runtime,omitempty"` - // ServiceAccount: [Preview] Service account to be used for building the - // container + // ServiceAccount: Service account to be used for building the container. The + // format of this field is + // `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. ServiceAccount string `json:"serviceAccount,omitempty"` // Source: The location of the function source code. Source *Source `json:"source,omitempty"` @@ -885,6 +886,8 @@ func (s GoogleCloudFunctionsV2LocationMetadata) MarshalJSON() ([]byte, error) { type GoogleCloudFunctionsV2OperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, @@ -1051,6 +1054,8 @@ func (s GoogleCloudFunctionsV2alphaLocationMetadata) MarshalJSON() ([]byte, erro type GoogleCloudFunctionsV2alphaOperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, @@ -1217,6 +1222,8 @@ func (s GoogleCloudFunctionsV2betaLocationMetadata) MarshalJSON() ([]byte, error type GoogleCloudFunctionsV2betaOperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` + // BuildName: The build name of the function for create and update operations. + BuildName string `json:"buildName,omitempty"` // CancelRequested: Identifies whether the user has requested cancellation of // the operation. Operations that have successfully been cancelled have // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, @@ -3527,8 +3534,7 @@ func (r *ProjectsLocationsFunctionsService) Patch(name string, function *Functio } // UpdateMask sets the optional parameter "updateMask": The list of fields to -// be updated. If no field mask is provided, all provided fields in the request -// will be updated. +// be updated. If no field mask is provided, all fields will be updated. func (c *ProjectsLocationsFunctionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFunctionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index a55a16ac353..aabc316825b 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -1409,6 +1409,61 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "listUsable": { + "description": "Retrieves a list of all usable backend buckets in the specified project.", + "flatPath": "projects/{project}/global/backendBuckets/listUsable", + "httpMethod": "GET", + "id": "compute.backendBuckets.listUsable", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/global/backendBuckets/listUsable", + "response": { + "$ref": "BackendBucketListUsable" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "patch": { "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", @@ -6614,7 +6669,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to delete.", + "description": "Name of the Operations resource to delete, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -6645,7 +6700,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -6735,7 +6790,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -6773,7 +6828,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to delete.", + "description": "Name of the Operations resource to delete, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -6801,7 +6856,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -14145,7 +14200,7 @@ ], "parameters": { "instantSnapshotGroup": { - "description": "Name of the instantSnapshotGroup resource to return.", + "description": "Name of the InstantSnapshotGroup resource to return.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -30899,7 +30954,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to delete.", + "description": "Name of the Operations resource to delete, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -30938,7 +30993,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -31044,7 +31099,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -44640,7 +44695,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to delete.", + "description": "Name of the Operations resource to delete, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -44679,7 +44734,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -44785,7 +44840,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -45223,7 +45278,7 @@ } } }, - "revision": "20240707", + "revision": "20240723", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -46509,7 +46564,7 @@ "type": "integer" }, "turboMode": { - "description": "Turbo mode to use for the instance. Supported modes include: * ALL_CORE_MAX Using empty string or not setting this field will use the default turbo mode.", + "description": "Turbo frequency mode to use for the instance. Supported modes include: * ALL_CORE_MAX Using empty string or not setting this field will use the platform-specific default turbo mode.", "type": "string" }, "visibleCoreCount": { @@ -48162,6 +48217,13 @@ "selfLinkWithId": { "description": "[Output Only] Server-defined URL for this resource with the resource id.", "type": "string" + }, + "usedBy": { + "description": "[Output Only] List of resources referencing that backend bucket.", + "items": { + "$ref": "BackendBucketUsedBy" + }, + "type": "array" } }, "type": "object" @@ -48448,6 +48510,167 @@ }, "type": "object" }, + "BackendBucketListUsable": { + "id": "BackendBucketListUsable", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of BackendBucket resources.", + "items": { + "$ref": "BackendBucket" + }, + "type": "array" + }, + "kind": { + "default": "compute#usableBackendBucketList", + "description": "[Output Only] Type of resource. Always compute#usableBackendBucketList for lists of usable backend buckets.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "BackendBucketUsedBy": { + "id": "BackendBucketUsedBy", + "properties": { + "reference": { + "description": "[Output Only] Server-defined URL for UrlMaps referencing that BackendBucket.", + "type": "string" + } + }, + "type": "object" + }, "BackendCustomMetric": { "description": "Custom Metrics are used for CUSTOM_METRICS balancing_mode and WEIGHTED_ROUND_ROBIN BackendService locality_lb_policy.", "id": "BackendCustomMetric", @@ -48641,7 +48864,7 @@ "type": "array" }, "localityLbPolicy": { - "description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", + "description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "enum": [ "INVALID_LB_POLICY", "LEAST_REQUEST", @@ -48803,6 +49026,10 @@ "format": "int32", "type": "integer" }, + "tlsSettings": { + "$ref": "BackendServiceTlsSettings", + "description": "Configuration for Backend Authenticated TLS and mTLS. May only be specified when the backend protocol is SSL, HTTPS or HTTP2." + }, "usedBy": { "description": "[Output Only] List of resources referencing given backend service.", "items": { @@ -49758,6 +49985,42 @@ }, "type": "object" }, + "BackendServiceTlsSettings": { + "id": "BackendServiceTlsSettings", + "properties": { + "authenticationConfig": { + "description": "Reference to the BackendAuthenticationConfig resource from the networksecurity.googleapis.com namespace. Can be used in authenticating TLS connections to the backend, as specified by the authenticationMode field. Can only be specified if authenticationMode is not NONE.", + "type": "string" + }, + "sni": { + "description": "Server Name Indication - see RFC3546 section 3.1. If set, the load balancer sends this string as the SNI hostname in the TLS connection to the backend, and requires that this string match a Subject Alternative Name (SAN) in the backend's server certificate. With a Regional Internet NEG backend, if the SNI is specified here, the load balancer uses it regardless of whether the Regional Internet NEG is specified with FQDN or IP address and port. When both sni and subjectAltNames[] are specified, the load balancer matches the backend certificate's SAN only to subjectAltNames[].", + "type": "string" + }, + "subjectAltNames": { + "description": "A list of Subject Alternative Names (SANs) that the Load Balancer verifies during a TLS handshake with the backend. When the server presents its X.509 certificate to the Load Balancer, the Load Balancer inspects the certificate's SAN field, and requires that at least one SAN match one of the subjectAltNames in the list. This field is limited to 5 entries. When both sni and subjectAltNames[] are specified, the load balancer matches the backend certificate's SAN only to subjectAltNames[].", + "items": { + "$ref": "BackendServiceTlsSettingsSubjectAltName" + }, + "type": "array" + } + }, + "type": "object" + }, + "BackendServiceTlsSettingsSubjectAltName": { + "description": "A Subject Alternative Name that the load balancer matches against the SAN field in the TLS certificate provided by the backend, specified as either a DNS name or a URI, in accordance with RFC 5280 4.2.1.6", + "id": "BackendServiceTlsSettingsSubjectAltName", + "properties": { + "dnsName": { + "description": "The SAN specified as a DNS Name.", + "type": "string" + }, + "uniformResourceIdentifier": { + "description": "The SAN specified as a URI.", + "type": "string" + } + }, + "type": "object" + }, "BackendServiceUsedBy": { "id": "BackendServiceUsedBy", "properties": { @@ -60165,7 +60428,7 @@ "type": "array" }, "baseInstanceName": { - "description": "The base instance name is a prefix that you want to attach to the names of all VMs in a MIG. The maximum character length is 58 and the name must comply with RFC1035 format. When a VM is created in the group, the MIG appends a hyphen and a random four-character string to the base instance name. If you want the MIG to assign sequential numbers instead of a random string, then end the base instance name with a hyphen followed by one or more hash symbols. The hash symbols indicate the number of digits. For example, a base instance name of \"vm-###\" results in \"vm-001\" as a VM name. @pattern [a-z](([-a-z0-9]{0,57})|([-a-z0-9]{0,52}-#{1,10}(\\\\[[0-9]{1,10}\\\\])?))", + "description": "The base instance name is a prefix that you want to attach to the names of all VMs in a MIG. The maximum character length is 58 and the name must comply with RFC1035 format. When a VM is created in the group, the MIG appends a hyphen and a random four-character string to the base instance name. If you want the MIG to assign sequential numbers instead of a random string, then end the base instance name with a hyphen followed by one or more hash symbols. The hash symbols indicate the number of digits. For example, a base instance name of \"vm-###\" results in \"vm-001\" as a VM name. @pattern [a-z](([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\\\\[[0-9]{1,10}\\\\])?))", "type": "string" }, "creationTimestamp": { @@ -60980,6 +61243,10 @@ "deprecated": true, "description": "This field is deprecated, ResizeRequests would not be provisioned immediately and would stay in the queue until explicitly cancelled. When set, defines queing parameters for the requested deferred capacity. When unset, the request starts provisioning immediately, or fails if immediate provisioning is not possible." }, + "region": { + "description": "[Output Only] The URL of a region where the resize request is located. Populated only for regional resize requests.", + "type": "string" + }, "requestedRunDuration": { "$ref": "Duration", "description": "Requested run duration for instances that will be created by this request. At the end of the run duration instance will be deleted." @@ -64185,6 +64452,14 @@ "description": "[Output Only] The ID value of the disk used to create this InstantSnapshot. This value may be used to determine whether the InstantSnapshot was taken from the current or a previous instance of a given disk name.", "type": "string" }, + "sourceInstantSnapshotGroup": { + "description": "[Output Only] URL of the source instant snapshot this instant snapshot is part of. Note that the source instant snapshot group must be in the same zone/region as the instant snapshot to be created. This can be a full or valid partial URL.", + "type": "string" + }, + "sourceInstantSnapshotGroupId": { + "description": "[Output Only] The ID value of the source instant snapshot group this InstantSnapshot is part of. This value may be used to determine whether the InstantSnapshot was created as part of an InstantSnapshotGroup creation.", + "type": "string" + }, "status": { "description": "[Output Only] The status of the instantSnapshot. This can be CREATING, DELETING, FAILED, or READY.", "enum": [ @@ -64370,6 +64645,7 @@ "type": "object" }, "InstantSnapshotGroup": { + "description": "Represents an InstantSnapshotGroup resource. An instant snapshot group is a set of instant snapshots that represents a point in time state of a consistency group.", "id": "InstantSnapshotGroup", "properties": { "creationTimestamp": { @@ -64410,6 +64686,9 @@ "description": "[Output Only] Server-defined URL for this resource's resource id.", "type": "string" }, + "sourceConsistencyGroup": { + "type": "string" + }, "status": { "description": "[Output Only]", "enum": [ @@ -85275,6 +85554,13 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "nat64subnetworks": { + "description": "List of Subnetwork resources whose traffic should be translated by NAT64 Gateway. It is used only when LIST_OF_IPV6_SUBNETWORKS is selected for the SubnetworkIpRangeToNat64Option above.", + "items": { + "$ref": "RouterNatSubnetworkToNat64" + }, + "type": "array" + }, "natIpAllocateOption": { "description": "Specify the NatIpAllocateOption, which can take one of the following values: - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs. - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty. ", "enum": [ @@ -85315,6 +85601,18 @@ ], "type": "string" }, + "sourceSubnetworkIpRangesToNat64": { + "description": "Specify the Nat option for NAT64, which can take one of the following values: - ALL_IPV6_SUBNETWORKS: All of the IP ranges in every Subnetwork are allowed to Nat. - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field nat64_subnetwork below) The default is NAT64_OPTION_UNSPECIFIED. Note that if this field contains NAT64_ALL_V6_SUBNETWORKS no other Router.Nat section in this region can also enable NAT64 for any Subnetworks in this network. Other Router.Nat sections can still be present to enable NAT44 only.", + "enum": [ + "ALL_IPV6_SUBNETWORKS", + "LIST_OF_IPV6_SUBNETWORKS" + ], + "enumDescriptions": [ + "NAT64 is enabled for all the IPv6 subnet ranges. In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs.", + "NAT64 is enabled for a list of IPv6 subnet ranges. In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs. If this option is used, the nat64_subnetworks field must be specified." + ], + "type": "string" + }, "subnetworks": { "description": "A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.", "items": { @@ -85474,6 +85772,17 @@ }, "type": "object" }, + "RouterNatSubnetworkToNat64": { + "description": "Specifies a subnetwork to enable NAT64.", + "id": "RouterNatSubnetworkToNat64", + "properties": { + "name": { + "description": "URL for the subnetwork resource that will use NAT64.", + "type": "string" + } + }, + "type": "object" + }, "RouterStatus": { "id": "RouterStatus", "properties": { @@ -86820,26 +87129,6 @@ "terminationTime": { "description": "Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time.", "type": "string" - }, - "windowsLicenseOptimizationMode": { - "description": "Represents the Windows Server License Optimization Mode of the VM. If unspecified, the default mode is `OFF`.", - "enum": [ - "AUTO", - "BALANCED", - "COST_OPTIMIZED", - "OFF", - "PERFORMANCE", - "UNSPECIFIED" - ], - "enumDescriptions": [ - "\"Automatically maximize savings and minimize performance impact by matching license optimization mode to current CPU utilization.", - "Significant license cost savings via moderate throttles (40% baseline, 10 minute maximum burst at full utilization).", - "Maximum license cost savings via restrictive throttles (20% baseline, 3.75 minute maximum burst at full utilization).", - "No license cost savings with maximum CPU performance.", - "Moderate license cost savings via least restrictive throttles (60% baseline, 22.5 minute maximum burst at full utilization).", - "Unspecified license optimization mode defaults to `OFF`." - ], - "type": "string" } }, "type": "object" @@ -95290,7 +95579,7 @@ "type": "string" }, "certificateMap": { - "description": "URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for global target proxies. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.", + "description": "URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products use Certificate Manager Certificates instead. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.", "type": "string" }, "creationTimestamp": { @@ -95368,7 +95657,7 @@ "type": "string" }, "sslCertificates": { - "description": "URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. Currently, you may specify up to 15 SSL certificates. sslCertificates do not apply when the load balancing scheme is set to INTERNAL_SELF_MANAGED.", + "description": "URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. SslCertificates do not apply when the load balancing scheme is set to INTERNAL_SELF_MANAGED. The URLs should refer to a SSL Certificate resource or Certificate Manager Certificate resource. Mixing Classic Certificates and Certificate Manager Certificates is not allowed. Certificate Manager Certificates must include the certificatemanager API. Certificate Manager Certificates are not supported by Global external Application Load Balancer or Classic Application Load Balancer, use certificate_map instead. Currently, you may specify up to 15 Classic SSL Certificates. Certificate Manager Certificates accepted formats are: - //certificatemanager.googleapis.com/projects/{project}/locations/{ location}/certificates/{resourceName}. - https://certificatemanager.googleapis.com/v1alpha1/projects/{project }/locations/{location}/certificates/{resourceName}. ", "items": { "type": "string" }, @@ -98465,7 +98754,7 @@ "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." }, "defaultService": { - "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", + "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any defaultRouteAction.weightedBackendServices. Conversely, if defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", "type": "string" }, "defaultUrlRedirect": { diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 3c4ac294300..e25a6cd55f1 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -2846,9 +2846,9 @@ type AdvancedMachineFeatures struct { // simultaneous multithreading (SMT) set this to 1. If unset, the maximum // number of threads supported per core by the underlying processor is assumed. ThreadsPerCore int64 `json:"threadsPerCore,omitempty"` - // TurboMode: Turbo mode to use for the instance. Supported modes include: * - // ALL_CORE_MAX Using empty string or not setting this field will use the - // default turbo mode. + // TurboMode: Turbo frequency mode to use for the instance. Supported modes + // include: * ALL_CORE_MAX Using empty string or not setting this field will + // use the platform-specific default turbo mode. TurboMode string `json:"turboMode,omitempty"` // VisibleCoreCount: The number of physical cores to expose to an instance. // Multiply by the number of threads per core to compute the total number of @@ -4880,6 +4880,8 @@ type BackendBucket struct { // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the // resource id. SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // UsedBy: [Output Only] List of resources referencing that backend bucket. + UsedBy []*BackendBucketUsedBy `json:"usedBy,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -5269,6 +5271,181 @@ func (s BackendBucketListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type BackendBucketListUsable struct { + // Id: [Output Only] Unique identifier for the resource; defined by the server. + Id string `json:"id,omitempty"` + // Items: A list of BackendBucket resources. + Items []*BackendBucket `json:"items,omitempty"` + // Kind: [Output Only] Type of resource. Always compute#usableBackendBucketList + // for lists of usable backend buckets. + Kind string `json:"kind,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will have their + // own nextPageToken to continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *BackendBucketListUsableWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Id") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Id") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackendBucketListUsable) MarshalJSON() ([]byte, error) { + type NoMethod BackendBucketListUsable + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackendBucketListUsableWarning: [Output Only] Informational warning message. +type BackendBucketListUsableWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*BackendBucketListUsableWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackendBucketListUsableWarning) MarshalJSON() ([]byte, error) { + type NoMethod BackendBucketListUsableWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type BackendBucketListUsableWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackendBucketListUsableWarningData) MarshalJSON() ([]byte, error) { + type NoMethod BackendBucketListUsableWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type BackendBucketUsedBy struct { + // Reference: [Output Only] Server-defined URL for UrlMaps referencing that + // BackendBucket. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Reference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Reference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackendBucketUsedBy) MarshalJSON() ([]byte, error) { + type NoMethod BackendBucketUsedBy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BackendCustomMetric: Custom Metrics are used for CUSTOM_METRICS // balancing_mode and WEIGHTED_ROUND_ROBIN BackendService locality_lb_policy. type BackendCustomMetric struct { @@ -5535,11 +5712,13 @@ type BackendService struct { // - A regional backend service with the service_protocol set to HTTP, HTTPS, // or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global // backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, - // INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not NONE, and - // this field is not set to MAGLEV or RING_HASH, session affinity settings will - // not take effect. Only ROUND_ROBIN and RING_HASH are supported when the - // backend service is referenced by a URL map that is bound to target gRPC - // proxy that has validateForProxyless field set to true. + // INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not + // configured—that is, if session affinity remains at the default value of + // NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If + // session affinity is set to a value other than NONE, then the default value + // for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported + // when the backend service is referenced by a URL map that is bound to target + // gRPC proxy that has validateForProxyless field set to true. // // Possible values: // "INVALID_LB_POLICY" @@ -5741,6 +5920,9 @@ type BackendService struct { // by a URL map that is bound to target gRPC proxy that has // validateForProxyless field set to true. Instead, use maxStreamDuration. TimeoutSec int64 `json:"timeoutSec,omitempty"` + // TlsSettings: Configuration for Backend Authenticated TLS and mTLS. May only + // be specified when the backend protocol is SSL, HTTPS or HTTP2. + TlsSettings *BackendServiceTlsSettings `json:"tlsSettings,omitempty"` // UsedBy: [Output Only] List of resources referencing given backend service. UsedBy []*BackendServiceUsedBy `json:"usedBy,omitempty"` // VpcNetworkScope: The network scope of the backends that can be added to the @@ -7075,6 +7257,75 @@ func (s BackendServiceReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type BackendServiceTlsSettings struct { + // AuthenticationConfig: Reference to the BackendAuthenticationConfig resource + // from the networksecurity.googleapis.com namespace. Can be used in + // authenticating TLS connections to the backend, as specified by the + // authenticationMode field. Can only be specified if authenticationMode is not + // NONE. + AuthenticationConfig string `json:"authenticationConfig,omitempty"` + // Sni: Server Name Indication - see RFC3546 section 3.1. If set, the load + // balancer sends this string as the SNI hostname in the TLS connection to the + // backend, and requires that this string match a Subject Alternative Name + // (SAN) in the backend's server certificate. With a Regional Internet NEG + // backend, if the SNI is specified here, the load balancer uses it regardless + // of whether the Regional Internet NEG is specified with FQDN or IP address + // and port. When both sni and subjectAltNames[] are specified, the load + // balancer matches the backend certificate's SAN only to subjectAltNames[]. + Sni string `json:"sni,omitempty"` + // SubjectAltNames: A list of Subject Alternative Names (SANs) that the Load + // Balancer verifies during a TLS handshake with the backend. When the server + // presents its X.509 certificate to the Load Balancer, the Load Balancer + // inspects the certificate's SAN field, and requires that at least one SAN + // match one of the subjectAltNames in the list. This field is limited to 5 + // entries. When both sni and subjectAltNames[] are specified, the load + // balancer matches the backend certificate's SAN only to subjectAltNames[]. + SubjectAltNames []*BackendServiceTlsSettingsSubjectAltName `json:"subjectAltNames,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuthenticationConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuthenticationConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackendServiceTlsSettings) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceTlsSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackendServiceTlsSettingsSubjectAltName: A Subject Alternative Name that the +// load balancer matches against the SAN field in the TLS certificate provided +// by the backend, specified as either a DNS name or a URI, in accordance with +// RFC 5280 4.2.1.6 +type BackendServiceTlsSettingsSubjectAltName struct { + // DnsName: The SAN specified as a DNS Name. + DnsName string `json:"dnsName,omitempty"` + // UniformResourceIdentifier: The SAN specified as a URI. + UniformResourceIdentifier string `json:"uniformResourceIdentifier,omitempty"` + // ForceSendFields is a list of field names (e.g. "DnsName") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DnsName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackendServiceTlsSettingsSubjectAltName) MarshalJSON() ([]byte, error) { + type NoMethod BackendServiceTlsSettingsSubjectAltName + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type BackendServiceUsedBy struct { // Reference: [Output Only] Server-defined URL for resources referencing given // BackendService like UrlMaps, TargetTcpProxies, TargetSslProxies and @@ -18939,7 +19190,7 @@ type InstanceGroupManager struct { // more hash symbols. The hash symbols indicate the number of digits. For // example, a base instance name of "vm-###" results in "vm-001" as a VM name. // @pattern a-z - // (([-a-z0-9]{0,57})|([-a-z0-9]{0,52}-#{1,10}(\\[[0-9]{1,10}\\])?)) + // (([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\\[[0-9]{1,10}\\])?)) BaseInstanceName string `json:"baseInstanceName,omitempty"` // CreationTimestamp: [Output Only] The creation timestamp for this managed // instance group in RFC3339 text format. @@ -19824,6 +20075,9 @@ type InstanceGroupManagerResizeRequest struct { // capacity. When unset, the request starts provisioning immediately, or fails // if immediate provisioning is not possible. QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` + // Region: [Output Only] The URL of a region where the resize request is + // located. Populated only for regional resize requests. + Region string `json:"region,omitempty"` // RequestedRunDuration: Requested run duration for instances that will be // created by this request. At the end of the run duration instance will be // deleted. @@ -23721,6 +23975,16 @@ type InstantSnapshot struct { // InstantSnapshot was taken from the current or a previous instance of a given // disk name. SourceDiskId string `json:"sourceDiskId,omitempty"` + // SourceInstantSnapshotGroup: [Output Only] URL of the source instant snapshot + // this instant snapshot is part of. Note that the source instant snapshot + // group must be in the same zone/region as the instant snapshot to be created. + // This can be a full or valid partial URL. + SourceInstantSnapshotGroup string `json:"sourceInstantSnapshotGroup,omitempty"` + // SourceInstantSnapshotGroupId: [Output Only] The ID value of the source + // instant snapshot group this InstantSnapshot is part of. This value may be + // used to determine whether the InstantSnapshot was created as part of an + // InstantSnapshotGroup creation. + SourceInstantSnapshotGroupId string `json:"sourceInstantSnapshotGroupId,omitempty"` // Status: [Output Only] The status of the instantSnapshot. This can be // CREATING, DELETING, FAILED, or READY. // @@ -23914,6 +24178,9 @@ func (s InstantSnapshotAggregatedListWarningData) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InstantSnapshotGroup: Represents an InstantSnapshotGroup resource. An +// instant snapshot group is a set of instant snapshots that represents a point +// in time state of a consistency group. type InstantSnapshotGroup struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -23943,7 +24210,8 @@ type InstantSnapshotGroup struct { SelfLink string `json:"selfLink,omitempty"` // SelfLinkWithId: [Output Only] Server-defined URL for this resource's // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + SourceConsistencyGroup string `json:"sourceConsistencyGroup,omitempty"` // Status: [Output Only] // // Possible values: @@ -46304,6 +46572,10 @@ type RouterNat struct { // Name: Unique name of this Nat service. The name must be 1-63 characters long // and comply with RFC1035. Name string `json:"name,omitempty"` + // Nat64subnetworks: List of Subnetwork resources whose traffic should be + // translated by NAT64 Gateway. It is used only when LIST_OF_IPV6_SUBNETWORKS + // is selected for the SubnetworkIpRangeToNat64Option above. + Nat64subnetworks []*RouterNatSubnetworkToNat64 `json:"nat64subnetworks,omitempty"` // NatIpAllocateOption: Specify the NatIpAllocateOption, which can take one of // the following values: - MANUAL_ONLY: Uses only Nat IP addresses provided by // customers. When there are not enough specified Nat IPs, the Nat service @@ -46341,6 +46613,22 @@ type RouterNat struct { // "LIST_OF_SUBNETWORKS" - A list of Subnetworks are allowed to Nat // (specified in the field subnetwork below) SourceSubnetworkIpRangesToNat string `json:"sourceSubnetworkIpRangesToNat,omitempty"` + // SourceSubnetworkIpRangesToNat64: Specify the Nat option for NAT64, which can + // take one of the following values: - ALL_IPV6_SUBNETWORKS: All of the IP + // ranges in every Subnetwork are allowed to Nat. - LIST_OF_IPV6_SUBNETWORKS: A + // list of Subnetworks are allowed to Nat (specified in the field + // nat64_subnetwork below) The default is NAT64_OPTION_UNSPECIFIED. Note that + // if this field contains NAT64_ALL_V6_SUBNETWORKS no other Router.Nat section + // in this region can also enable NAT64 for any Subnetworks in this network. + // Other Router.Nat sections can still be present to enable NAT44 only. + // + // Possible values: + // "ALL_IPV6_SUBNETWORKS" - NAT64 is enabled for all the IPv6 subnet ranges. + // In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs. + // "LIST_OF_IPV6_SUBNETWORKS" - NAT64 is enabled for a list of IPv6 subnet + // ranges. In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs. + // If this option is used, the nat64_subnetworks field must be specified. + SourceSubnetworkIpRangesToNat64 string `json:"sourceSubnetworkIpRangesToNat64,omitempty"` // Subnetworks: A list of Subnetwork resources whose traffic should be // translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is // selected for the SubnetworkIpRangeToNatOption above. @@ -46531,6 +46819,28 @@ func (s RouterNatSubnetworkToNat) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RouterNatSubnetworkToNat64: Specifies a subnetwork to enable NAT64. +type RouterNatSubnetworkToNat64 struct { + // Name: URL for the subnetwork resource that will use NAT64. + Name string `json:"name,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RouterNatSubnetworkToNat64) MarshalJSON() ([]byte, error) { + type NoMethod RouterNatSubnetworkToNat64 + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type RouterStatus struct { // BestRoutes: A list of the best dynamic routes for this Cloud Router's // Virtual Private Cloud (VPC) network in the same region as this Cloud Router. @@ -47836,21 +48146,6 @@ type Scheduling struct { // terminated, in RFC3339 text format. If specified, the instance termination // action will be performed at the termination time. TerminationTime string `json:"terminationTime,omitempty"` - // WindowsLicenseOptimizationMode: Represents the Windows Server License - // Optimization Mode of the VM. If unspecified, the default mode is `OFF`. - // - // Possible values: - // "AUTO" - "Automatically maximize savings and minimize performance impact - // by matching license optimization mode to current CPU utilization. - // "BALANCED" - Significant license cost savings via moderate throttles (40% - // baseline, 10 minute maximum burst at full utilization). - // "COST_OPTIMIZED" - Maximum license cost savings via restrictive throttles - // (20% baseline, 3.75 minute maximum burst at full utilization). - // "OFF" - No license cost savings with maximum CPU performance. - // "PERFORMANCE" - Moderate license cost savings via least restrictive - // throttles (60% baseline, 22.5 minute maximum burst at full utilization). - // "UNSPECIFIED" - Unspecified license optimization mode defaults to `OFF`. - WindowsLicenseOptimizationMode string `json:"windowsLicenseOptimizationMode,omitempty"` // ForceSendFields is a list of field names (e.g. "AutomaticRestart") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -57135,8 +57430,10 @@ type TargetHttpsProxy struct { AuthorizationPolicy string `json:"authorizationPolicy,omitempty"` // CertificateMap: URL of a certificate map that identifies a certificate map // associated with the given target proxy. This field can only be set for - // global target proxies. If set, sslCertificates will be ignored. Accepted - // format is //certificatemanager.googleapis.com/projects/{project + // Global external Application Load Balancer or Classic Application Load + // Balancer. For other products use Certificate Manager Certificates instead. + // If set, sslCertificates will be ignored. Accepted format is + // //certificatemanager.googleapis.com/projects/{project // }/locations/{location}/certificateMaps/{resourceName}. CertificateMap string `json:"certificateMap,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. @@ -57229,9 +57526,19 @@ type TargetHttpsProxy struct { ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"` // SslCertificates: URLs to SslCertificate resources that are used to // authenticate connections between users and the load balancer. At least one - // SSL certificate must be specified. Currently, you may specify up to 15 SSL - // certificates. sslCertificates do not apply when the load balancing scheme is - // set to INTERNAL_SELF_MANAGED. + // SSL certificate must be specified. SslCertificates do not apply when the + // load balancing scheme is set to INTERNAL_SELF_MANAGED. The URLs should refer + // to a SSL Certificate resource or Certificate Manager Certificate resource. + // Mixing Classic Certificates and Certificate Manager Certificates is not + // allowed. Certificate Manager Certificates must include the + // certificatemanager API. Certificate Manager Certificates are not supported + // by Global external Application Load Balancer or Classic Application Load + // Balancer, use certificate_map instead. Currently, you may specify up to 15 + // Classic SSL Certificates. Certificate Manager Certificates accepted formats + // are: - //certificatemanager.googleapis.com/projects/{project}/locations/{ + // location}/certificates/{resourceName}. - + // https://certificatemanager.googleapis.com/v1alpha1/projects/{project + // }/locations/{location}/certificates/{resourceName}. SslCertificates []string `json:"sslCertificates,omitempty"` // SslPolicy: URL of SslPolicy resource that will be associated with the // TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource has no @@ -60681,12 +60988,12 @@ type UrlMap struct { // defaultRouteAction is also specified, advanced routing actions, such as URL // rewrites, take effect before sending the request to the backend. However, if // defaultService is specified, defaultRouteAction cannot contain any - // weightedBackendServices. Conversely, if routeAction specifies any - // weightedBackendServices, service must not be specified. If defaultService is - // specified, then set either defaultUrlRedirect , or - // defaultRouteAction.weightedBackendService Don't set both. defaultService has - // no effect when the URL map is bound to a target gRPC proxy that has the - // validateForProxyless field set to true. + // defaultRouteAction.weightedBackendServices. Conversely, if + // defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, + // defaultService must not be specified. If defaultService is specified, then + // set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService + // Don't set both. defaultService has no effect when the URL map is bound to a + // target gRPC proxy that has the validateForProxyless field set to true. DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified hostRules match, the request // is redirected to a URL specified by defaultUrlRedirect. If diff --git a/compute/v0.alpha/compute2-gen.go b/compute/v0.alpha/compute2-gen.go index f4881b02787..75167726c3f 100644 --- a/compute/v0.alpha/compute2-gen.go +++ b/compute/v0.alpha/compute2-gen.go @@ -3799,6 +3799,214 @@ func (c *BackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucke } } +type BackendBucketsListUsableCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListUsable: Retrieves a list of all usable backend buckets in the specified +// project. +// +// - project: Project ID for this request. +func (r *BackendBucketsService) ListUsable(project string) *BackendBucketsListUsableCall { + c := &BackendBucketsListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *BackendBucketsListUsableCall) Filter(filter string) *BackendBucketsListUsableCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *BackendBucketsListUsableCall) MaxResults(maxResults int64) *BackendBucketsListUsableCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *BackendBucketsListUsableCall) OrderBy(orderBy string) *BackendBucketsListUsableCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *BackendBucketsListUsableCall) PageToken(pageToken string) *BackendBucketsListUsableCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *BackendBucketsListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendBucketsListUsableCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + 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 *BackendBucketsListUsableCall) Fields(s ...googleapi.Field) *BackendBucketsListUsableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *BackendBucketsListUsableCall) IfNoneMatch(entityTag string) *BackendBucketsListUsableCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BackendBucketsListUsableCall) Context(ctx context.Context) *BackendBucketsListUsableCall { + 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 *BackendBucketsListUsableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BackendBucketsListUsableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "projects/{project}/global/backendBuckets/listUsable") + 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{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.backendBuckets.listUsable" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendBucketListUsable.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 *BackendBucketsListUsableCall) Do(opts ...googleapi.CallOption) (*BackendBucketListUsable, 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 := &BackendBucketListUsable{ + 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 +} + +// 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 *BackendBucketsListUsableCall) Pages(ctx context.Context, f func(*BackendBucketListUsable) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 BackendBucketsPatchCall struct { s *Service project string @@ -19613,22 +19821,23 @@ func (c *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(* } type GlobalOperationsDeleteCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Delete: Deletes the specified Operations resource. // -// - operation: Name of the Operations resource to delete. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall { +// - operation: Name of the Operations resource to delete, or its unique +// numeric identifier. +// - project: Project ID for this request. +func (r *GlobalOperationsService) Delete(project string, operationid string) *GlobalOperationsDeleteCall { c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.operation = operation + c.operationid = operationid return c } @@ -19669,7 +19878,7 @@ func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, erro req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -19691,7 +19900,7 @@ func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { type GlobalOperationsGetCall struct { s *Service project string - operation string + operationid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -19700,12 +19909,13 @@ type GlobalOperationsGetCall struct { // Get: Retrieves the specified Operations resource. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +func (r *GlobalOperationsService) Get(project string, operationid string) *GlobalOperationsGetCall { c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.operation = operation + c.operationid = operationid return c } @@ -19757,7 +19967,7 @@ func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -20007,12 +20217,12 @@ func (c *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationL } type GlobalOperationsWaitCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Wait: Waits for the specified Operation resource to return as `DONE` or for @@ -20027,12 +20237,13 @@ type GlobalOperationsWaitCall struct { // actually done when the method returns. Be prepared to retry if the operation // is not `DONE`. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Wait(project string, operation string) *GlobalOperationsWaitCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +func (r *GlobalOperationsService) Wait(project string, operationid string) *GlobalOperationsWaitCall { c := &GlobalOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.operation = operation + c.operationid = operationid return c } @@ -20073,7 +20284,7 @@ func (c *GlobalOperationsWaitCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -20116,19 +20327,20 @@ func (c *GlobalOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, } type GlobalOrganizationOperationsDeleteCall struct { - s *Service - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Delete: Deletes the specified Operations resource. // -// - operation: Name of the Operations resource to delete. -func (r *GlobalOrganizationOperationsService) Delete(operation string) *GlobalOrganizationOperationsDeleteCall { +// - operation: Name of the Operations resource to delete, or its unique +// numeric identifier. +func (r *GlobalOrganizationOperationsService) Delete(operationid string) *GlobalOrganizationOperationsDeleteCall { c := &GlobalOrganizationOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operation = operation + c.operationid = operationid return c } @@ -20174,7 +20386,7 @@ func (c *GlobalOrganizationOperationsDeleteCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -20195,7 +20407,7 @@ func (c *GlobalOrganizationOperationsDeleteCall) Do(opts ...googleapi.CallOption type GlobalOrganizationOperationsGetCall struct { s *Service - operation string + operationid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -20205,10 +20417,11 @@ type GlobalOrganizationOperationsGetCall struct { // Get: Retrieves the specified Operations resource. Gets a list of operations // by making a `list()` request. // -// - operation: Name of the Operations resource to return. -func (r *GlobalOrganizationOperationsService) Get(operation string) *GlobalOrganizationOperationsGetCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +func (r *GlobalOrganizationOperationsService) Get(operationid string) *GlobalOrganizationOperationsGetCall { c := &GlobalOrganizationOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operation = operation + c.operationid = operationid return c } @@ -20265,7 +20478,7 @@ func (c *GlobalOrganizationOperationsGetCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -40577,7 +40790,7 @@ type InstantSnapshotGroupsGetCall struct { // Get: returns the specified InstantSnapshotGroup resource in the specified // zone. // -// - instantSnapshotGroup: Name of the instantSnapshotGroup resource to return. +// - instantSnapshotGroup: Name of the InstantSnapshotGroup resource to return. // - project: Project ID for this request. // - zone: The name of the zone for this request. func (r *InstantSnapshotGroupsService) Get(project string, zone string, instantSnapshotGroup string) *InstantSnapshotGroupsGetCall { diff --git a/compute/v0.alpha/compute3-gen.go b/compute/v0.alpha/compute3-gen.go index a105097e822..2a15f840ca5 100644 --- a/compute/v0.alpha/compute3-gen.go +++ b/compute/v0.alpha/compute3-gen.go @@ -19600,25 +19600,26 @@ func (c *RegionNotificationEndpointsTestIamPermissionsCall) Do(opts ...googleapi } type RegionOperationsDeleteCall struct { - s *Service - project string - region string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + region string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Delete: Deletes the specified region-specific Operations resource. // -// - operation: Name of the Operations resource to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall { +// - operation: Name of the Operations resource to delete, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionOperationsService) Delete(project string, region string, operationid string) *RegionOperationsDeleteCall { c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.operation = operation + c.operationid = operationid return c } @@ -19660,7 +19661,7 @@ func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, erro googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -19683,7 +19684,7 @@ type RegionOperationsGetCall struct { s *Service project string region string - operation string + operationid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -19692,14 +19693,15 @@ type RegionOperationsGetCall struct { // Get: Retrieves the specified region-specific Operations resource. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionOperationsService) Get(project string, region string, operationid string) *RegionOperationsGetCall { c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.operation = operation + c.operationid = operationid return c } @@ -19752,7 +19754,7 @@ func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -20006,13 +20008,13 @@ func (c *RegionOperationsListCall) Pages(ctx context.Context, f func(*OperationL } type RegionOperationsWaitCall struct { - s *Service - project string - region string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + region string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Wait: Waits for the specified Operation resource to return as `DONE` or for @@ -20027,14 +20029,15 @@ type RegionOperationsWaitCall struct { // actually done when the method returns. Be prepared to retry if the operation // is not `DONE`. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Wait(project string, region string, operation string) *RegionOperationsWaitCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionOperationsService) Wait(project string, region string, operationid string) *RegionOperationsWaitCall { c := &RegionOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.operation = operation + c.operationid = operationid return c } @@ -20076,7 +20079,7 @@ func (c *RegionOperationsWaitCall) doRequest(alt string) (*http.Response, error) googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -59062,25 +59065,26 @@ func (c *VpnTunnelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Te } type ZoneOperationsDeleteCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + zone string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Delete: Deletes the specified zone-specific Operations resource. // -// - operation: Name of the Operations resource to delete. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall { +// - operation: Name of the Operations resource to delete, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *ZoneOperationsService) Delete(project string, zone string, operationid string) *ZoneOperationsDeleteCall { c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.operation = operation + c.operationid = operationid return c } @@ -59122,7 +59126,7 @@ func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -59145,7 +59149,7 @@ type ZoneOperationsGetCall struct { s *Service project string zone string - operation string + operationid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -59154,14 +59158,15 @@ type ZoneOperationsGetCall struct { // Get: Retrieves the specified zone-specific Operations resource. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *ZoneOperationsService) Get(project string, zone string, operationid string) *ZoneOperationsGetCall { c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.operation = operation + c.operationid = operationid return c } @@ -59214,7 +59219,7 @@ func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -59468,13 +59473,13 @@ func (c *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationLis } type ZoneOperationsWaitCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + zone string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Wait: Waits for the specified Operation resource to return as `DONE` or for @@ -59488,14 +59493,15 @@ type ZoneOperationsWaitCall struct { // guarantee that the operation is actually done when the method returns. Be // prepared to retry if the operation is not `DONE`. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Wait(project string, zone string, operation string) *ZoneOperationsWaitCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *ZoneOperationsService) Wait(project string, zone string, operationid string) *ZoneOperationsWaitCall { c := &ZoneOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.operation = operation + c.operationid = operationid return c } @@ -59537,7 +59543,7 @@ func (c *ZoneOperationsWaitCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 679233999a4..289395539ba 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -5736,7 +5736,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to delete.", + "description": "Name of the Operations resource to delete, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -5767,7 +5767,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -5857,7 +5857,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -5895,7 +5895,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to delete.", + "description": "Name of the Operations resource to delete, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -5923,7 +5923,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -25614,7 +25614,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to delete.", + "description": "Name of the Operations resource to delete, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -25653,7 +25653,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -25759,7 +25759,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -37148,7 +37148,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to delete.", + "description": "Name of the Operations resource to delete, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -37187,7 +37187,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -37293,7 +37293,7 @@ ], "parameters": { "operation": { - "description": "Name of the Operations resource to return.", + "description": "Name of the Operations resource to return, or its unique numeric identifier.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -37421,7 +37421,7 @@ } } }, - "revision": "20240702", + "revision": "20240723", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -40542,7 +40542,7 @@ "type": "array" }, "localityLbPolicy": { - "description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", + "description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "enum": [ "INVALID_LB_POLICY", "LEAST_REQUEST", @@ -47071,6 +47071,13 @@ "description": "[Output Only] Server-defined URL for the resource.", "type": "string" }, + "sourceRegions": { + "description": "The list of cloud regions from which health checks are performed. If any regions are specified, then exactly 3 regions should be specified. The region names must be valid names of Google Cloud regions. This can only be set for global health check. If this list is non-empty, then there are restrictions on what other health check fields are supported and what other resources can use this health check: - SSL, HTTP2, and GRPC protocols are not supported. - The TCP request field is not supported. - The proxyHeader field for HTTP, HTTPS, and TCP is not supported. - The checkIntervalSec field must be at least 30. - The health check cannot be used with BackendService nor with managed instance group auto-healing. ", + "items": { + "type": "string" + }, + "type": "array" + }, "sslHealthCheck": { "$ref": "SSLHealthCheck" }, @@ -50043,7 +50050,7 @@ "type": "array" }, "baseInstanceName": { - "description": "The base instance name is a prefix that you want to attach to the names of all VMs in a MIG. The maximum character length is 58 and the name must comply with RFC1035 format. When a VM is created in the group, the MIG appends a hyphen and a random four-character string to the base instance name. If you want the MIG to assign sequential numbers instead of a random string, then end the base instance name with a hyphen followed by one or more hash symbols. The hash symbols indicate the number of digits. For example, a base instance name of \"vm-###\" results in \"vm-001\" as a VM name. @pattern [a-z](([-a-z0-9]{0,57})|([-a-z0-9]{0,52}-#{1,10}(\\\\[[0-9]{1,10}\\\\])?))", + "description": "The base instance name is a prefix that you want to attach to the names of all VMs in a MIG. The maximum character length is 58 and the name must comply with RFC1035 format. When a VM is created in the group, the MIG appends a hyphen and a random four-character string to the base instance name. If you want the MIG to assign sequential numbers instead of a random string, then end the base instance name with a hyphen followed by one or more hash symbols. The hash symbols indicate the number of digits. For example, a base instance name of \"vm-###\" results in \"vm-001\" as a VM name. @pattern [a-z](([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\\\\[[0-9]{1,10}\\\\])?))", "type": "string" }, "creationTimestamp": { @@ -69008,12 +69015,26 @@ "description": "[Output Only] An opaque ID of the host on which the VM is running.", "type": "string" }, + "scheduling": { + "$ref": "ResourceStatusScheduling" + }, "upcomingMaintenance": { "$ref": "UpcomingMaintenance" } }, "type": "object" }, + "ResourceStatusScheduling": { + "id": "ResourceStatusScheduling", + "properties": { + "availabilityDomain": { + "description": "Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Route": { "description": "Represents a Route resource. A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview.", "id": "Route", @@ -78419,7 +78440,7 @@ "type": "string" }, "certificateMap": { - "description": "URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for global target proxies. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.", + "description": "URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products use Certificate Manager Certificates instead. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.", "type": "string" }, "creationTimestamp": { @@ -78486,7 +78507,7 @@ "type": "string" }, "sslCertificates": { - "description": "URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. Currently, you may specify up to 15 SSL certificates. sslCertificates do not apply when the load balancing scheme is set to INTERNAL_SELF_MANAGED.", + "description": "URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. SslCertificates do not apply when the load balancing scheme is set to INTERNAL_SELF_MANAGED. The URLs should refer to a SSL Certificate resource or Certificate Manager Certificate resource. Mixing Classic Certificates and Certificate Manager Certificates is not allowed. Certificate Manager Certificates must include the certificatemanager API. Certificate Manager Certificates are not supported by Global external Application Load Balancer or Classic Application Load Balancer, use certificate_map instead. Currently, you may specify up to 15 Classic SSL Certificates. Certificate Manager Certificates accepted formats are: - //certificatemanager.googleapis.com/projects/{project}/locations/{ location}/certificates/{resourceName}. - https://certificatemanager.googleapis.com/v1alpha1/projects/{project }/locations/{location}/certificates/{resourceName}. ", "items": { "type": "string" }, @@ -81437,7 +81458,7 @@ "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." }, "defaultService": { - "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", + "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any defaultRouteAction.weightedBackendServices. Conversely, if defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", "type": "string" }, "defaultUrlRedirect": { diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index 29abc286d58..38f967e574b 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -5015,11 +5015,13 @@ type BackendService struct { // - A regional backend service with the service_protocol set to HTTP, HTTPS, // or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global // backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, - // INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not NONE, and - // this field is not set to MAGLEV or RING_HASH, session affinity settings will - // not take effect. Only ROUND_ROBIN and RING_HASH are supported when the - // backend service is referenced by a URL map that is bound to target gRPC - // proxy that has validateForProxyless field set to true. + // INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not + // configured—that is, if session affinity remains at the default value of + // NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If + // session affinity is set to a value other than NONE, then the default value + // for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported + // when the backend service is referenced by a URL map that is bound to target + // gRPC proxy that has validateForProxyless field set to true. // // Possible values: // "INVALID_LB_POLICY" @@ -12733,7 +12735,18 @@ type HealthCheck struct { // to global health checks. Region string `json:"region,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` + SelfLink string `json:"selfLink,omitempty"` + // SourceRegions: The list of cloud regions from which health checks are + // performed. If any regions are specified, then exactly 3 regions should be + // specified. The region names must be valid names of Google Cloud regions. + // This can only be set for global health check. If this list is non-empty, + // then there are restrictions on what other health check fields are supported + // and what other resources can use this health check: - SSL, HTTP2, and GRPC + // protocols are not supported. - The TCP request field is not supported. - The + // proxyHeader field for HTTP, HTTPS, and TCP is not supported. - The + // checkIntervalSec field must be at least 30. - The health check cannot be + // used with BackendService nor with managed instance group auto-healing. + SourceRegions []string `json:"sourceRegions,omitempty"` SslHealthCheck *SSLHealthCheck `json:"sslHealthCheck,omitempty"` TcpHealthCheck *TCPHealthCheck `json:"tcpHealthCheck,omitempty"` // TimeoutSec: How long (in seconds) to wait before claiming failure. The @@ -16115,7 +16128,7 @@ type InstanceGroupManager struct { // more hash symbols. The hash symbols indicate the number of digits. For // example, a base instance name of "vm-###" results in "vm-001" as a VM name. // @pattern a-z - // (([-a-z0-9]{0,57})|([-a-z0-9]{0,52}-#{1,10}(\\[[0-9]{1,10}\\])?)) + // (([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\\[[0-9]{1,10}\\])?)) BaseInstanceName string `json:"baseInstanceName,omitempty"` // CreationTimestamp: [Output Only] The creation timestamp for this managed // instance group in RFC3339 text format. @@ -37129,8 +37142,9 @@ func (s ResourcePolicyWeeklyCycleDayOfWeek) MarshalJSON() ([]byte, error) { type ResourceStatus struct { // PhysicalHost: [Output Only] An opaque ID of the host on which the VM is // running. - PhysicalHost string `json:"physicalHost,omitempty"` - UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` + PhysicalHost string `json:"physicalHost,omitempty"` + Scheduling *ResourceStatusScheduling `json:"scheduling,omitempty"` + UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` // ForceSendFields is a list of field names (e.g. "PhysicalHost") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -37149,6 +37163,29 @@ func (s ResourceStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type ResourceStatusScheduling struct { + // AvailabilityDomain: Specifies the availability domain to place the instance + // in. The value must be a number between 1 and the number of availability + // domains specified in the spread placement policy attached to the instance. + AvailabilityDomain int64 `json:"availabilityDomain,omitempty"` + // ForceSendFields is a list of field names (e.g. "AvailabilityDomain") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AvailabilityDomain") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ResourceStatusScheduling) MarshalJSON() ([]byte, error) { + type NoMethod ResourceStatusScheduling + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Route: Represents a Route resource. A route defines a path from VM instances // in the VPC network to a specific destination. This destination can be inside // or outside the VPC network. For more information, read the Routes overview. @@ -47244,8 +47281,10 @@ type TargetHttpsProxy struct { AuthorizationPolicy string `json:"authorizationPolicy,omitempty"` // CertificateMap: URL of a certificate map that identifies a certificate map // associated with the given target proxy. This field can only be set for - // global target proxies. If set, sslCertificates will be ignored. Accepted - // format is //certificatemanager.googleapis.com/projects/{project + // Global external Application Load Balancer or Classic Application Load + // Balancer. For other products use Certificate Manager Certificates instead. + // If set, sslCertificates will be ignored. Accepted format is + // //certificatemanager.googleapis.com/projects/{project // }/locations/{location}/certificateMaps/{resourceName}. CertificateMap string `json:"certificateMap,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. @@ -47322,9 +47361,19 @@ type TargetHttpsProxy struct { ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"` // SslCertificates: URLs to SslCertificate resources that are used to // authenticate connections between users and the load balancer. At least one - // SSL certificate must be specified. Currently, you may specify up to 15 SSL - // certificates. sslCertificates do not apply when the load balancing scheme is - // set to INTERNAL_SELF_MANAGED. + // SSL certificate must be specified. SslCertificates do not apply when the + // load balancing scheme is set to INTERNAL_SELF_MANAGED. The URLs should refer + // to a SSL Certificate resource or Certificate Manager Certificate resource. + // Mixing Classic Certificates and Certificate Manager Certificates is not + // allowed. Certificate Manager Certificates must include the + // certificatemanager API. Certificate Manager Certificates are not supported + // by Global external Application Load Balancer or Classic Application Load + // Balancer, use certificate_map instead. Currently, you may specify up to 15 + // Classic SSL Certificates. Certificate Manager Certificates accepted formats + // are: - //certificatemanager.googleapis.com/projects/{project}/locations/{ + // location}/certificates/{resourceName}. - + // https://certificatemanager.googleapis.com/v1alpha1/projects/{project + // }/locations/{location}/certificates/{resourceName}. SslCertificates []string `json:"sslCertificates,omitempty"` // SslPolicy: URL of SslPolicy resource that will be associated with the // TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource has no @@ -50572,12 +50621,12 @@ type UrlMap struct { // defaultRouteAction is also specified, advanced routing actions, such as URL // rewrites, take effect before sending the request to the backend. However, if // defaultService is specified, defaultRouteAction cannot contain any - // weightedBackendServices. Conversely, if routeAction specifies any - // weightedBackendServices, service must not be specified. If defaultService is - // specified, then set either defaultUrlRedirect , or - // defaultRouteAction.weightedBackendService Don't set both. defaultService has - // no effect when the URL map is bound to a target gRPC proxy that has the - // validateForProxyless field set to true. + // defaultRouteAction.weightedBackendServices. Conversely, if + // defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, + // defaultService must not be specified. If defaultService is specified, then + // set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService + // Don't set both. defaultService has no effect when the URL map is bound to a + // target gRPC proxy that has the validateForProxyless field set to true. DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified hostRules match, the request // is redirected to a URL specified by defaultUrlRedirect. If diff --git a/compute/v1/compute2-gen.go b/compute/v1/compute2-gen.go index 424c7e15f91..31d1628d5c5 100644 --- a/compute/v1/compute2-gen.go +++ b/compute/v1/compute2-gen.go @@ -17076,22 +17076,23 @@ func (c *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(* } type GlobalOperationsDeleteCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Delete: Deletes the specified Operations resource. // -// - operation: Name of the Operations resource to delete. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall { +// - operation: Name of the Operations resource to delete, or its unique +// numeric identifier. +// - project: Project ID for this request. +func (r *GlobalOperationsService) Delete(project string, operationid string) *GlobalOperationsDeleteCall { c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.operation = operation + c.operationid = operationid return c } @@ -17132,7 +17133,7 @@ func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, erro req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -17154,7 +17155,7 @@ func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { type GlobalOperationsGetCall struct { s *Service project string - operation string + operationid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -17163,12 +17164,13 @@ type GlobalOperationsGetCall struct { // Get: Retrieves the specified Operations resource. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +func (r *GlobalOperationsService) Get(project string, operationid string) *GlobalOperationsGetCall { c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.operation = operation + c.operationid = operationid return c } @@ -17220,7 +17222,7 @@ func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -17470,12 +17472,12 @@ func (c *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationL } type GlobalOperationsWaitCall struct { - s *Service - project string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Wait: Waits for the specified Operation resource to return as `DONE` or for @@ -17490,12 +17492,13 @@ type GlobalOperationsWaitCall struct { // actually done when the method returns. Be prepared to retry if the operation // is not `DONE`. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -func (r *GlobalOperationsService) Wait(project string, operation string) *GlobalOperationsWaitCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +func (r *GlobalOperationsService) Wait(project string, operationid string) *GlobalOperationsWaitCall { c := &GlobalOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.operation = operation + c.operationid = operationid return c } @@ -17536,7 +17539,7 @@ func (c *GlobalOperationsWaitCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -17579,19 +17582,20 @@ func (c *GlobalOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, } type GlobalOrganizationOperationsDeleteCall struct { - s *Service - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Delete: Deletes the specified Operations resource. // -// - operation: Name of the Operations resource to delete. -func (r *GlobalOrganizationOperationsService) Delete(operation string) *GlobalOrganizationOperationsDeleteCall { +// - operation: Name of the Operations resource to delete, or its unique +// numeric identifier. +func (r *GlobalOrganizationOperationsService) Delete(operationid string) *GlobalOrganizationOperationsDeleteCall { c := &GlobalOrganizationOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operation = operation + c.operationid = operationid return c } @@ -17637,7 +17641,7 @@ func (c *GlobalOrganizationOperationsDeleteCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -17658,7 +17662,7 @@ func (c *GlobalOrganizationOperationsDeleteCall) Do(opts ...googleapi.CallOption type GlobalOrganizationOperationsGetCall struct { s *Service - operation string + operationid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -17668,10 +17672,11 @@ type GlobalOrganizationOperationsGetCall struct { // Get: Retrieves the specified Operations resource. Gets a list of operations // by making a `list()` request. // -// - operation: Name of the Operations resource to return. -func (r *GlobalOrganizationOperationsService) Get(operation string) *GlobalOrganizationOperationsGetCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +func (r *GlobalOrganizationOperationsService) Get(operationid string) *GlobalOrganizationOperationsGetCall { c := &GlobalOrganizationOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.operation = operation + c.operationid = operationid return c } @@ -17728,7 +17733,7 @@ func (c *GlobalOrganizationOperationsGetCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } diff --git a/compute/v1/compute3-gen.go b/compute/v1/compute3-gen.go index 02d741ab8dd..155b2bca605 100644 --- a/compute/v1/compute3-gen.go +++ b/compute/v1/compute3-gen.go @@ -15367,25 +15367,26 @@ func (c *RegionNotificationEndpointsListCall) Pages(ctx context.Context, f func( } type RegionOperationsDeleteCall struct { - s *Service - project string - region string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + region string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Delete: Deletes the specified region-specific Operations resource. // -// - operation: Name of the Operations resource to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall { +// - operation: Name of the Operations resource to delete, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionOperationsService) Delete(project string, region string, operationid string) *RegionOperationsDeleteCall { c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.operation = operation + c.operationid = operationid return c } @@ -15427,7 +15428,7 @@ func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, erro googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -15450,7 +15451,7 @@ type RegionOperationsGetCall struct { s *Service project string region string - operation string + operationid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -15459,14 +15460,15 @@ type RegionOperationsGetCall struct { // Get: Retrieves the specified region-specific Operations resource. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionOperationsService) Get(project string, region string, operationid string) *RegionOperationsGetCall { c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.operation = operation + c.operationid = operationid return c } @@ -15519,7 +15521,7 @@ func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -15773,13 +15775,13 @@ func (c *RegionOperationsListCall) Pages(ctx context.Context, f func(*OperationL } type RegionOperationsWaitCall struct { - s *Service - project string - region string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + region string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Wait: Waits for the specified Operation resource to return as `DONE` or for @@ -15794,14 +15796,15 @@ type RegionOperationsWaitCall struct { // actually done when the method returns. Be prepared to retry if the operation // is not `DONE`. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionOperationsService) Wait(project string, region string, operation string) *RegionOperationsWaitCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionOperationsService) Wait(project string, region string, operationid string) *RegionOperationsWaitCall { c := &RegionOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.operation = operation + c.operationid = operationid return c } @@ -15843,7 +15846,7 @@ func (c *RegionOperationsWaitCall) doRequest(alt string) (*http.Response, error) googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -49069,25 +49072,26 @@ func (c *VpnTunnelsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, } type ZoneOperationsDeleteCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + zone string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Delete: Deletes the specified zone-specific Operations resource. // -// - operation: Name of the Operations resource to delete. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall { +// - operation: Name of the Operations resource to delete, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *ZoneOperationsService) Delete(project string, zone string, operationid string) *ZoneOperationsDeleteCall { c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.operation = operation + c.operationid = operationid return c } @@ -49129,7 +49133,7 @@ func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -49152,7 +49156,7 @@ type ZoneOperationsGetCall struct { s *Service project string zone string - operation string + operationid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context @@ -49161,14 +49165,15 @@ type ZoneOperationsGetCall struct { // Get: Retrieves the specified zone-specific Operations resource. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *ZoneOperationsService) Get(project string, zone string, operationid string) *ZoneOperationsGetCall { c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.operation = operation + c.operationid = operationid return c } @@ -49221,7 +49226,7 @@ func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -49475,13 +49480,13 @@ func (c *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationLis } type ZoneOperationsWaitCall struct { - s *Service - project string - zone string - operation string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + s *Service + project string + zone string + operationid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } // Wait: Waits for the specified Operation resource to return as `DONE` or for @@ -49495,14 +49500,15 @@ type ZoneOperationsWaitCall struct { // guarantee that the operation is actually done when the method returns. Be // prepared to retry if the operation is not `DONE`. // -// - operation: Name of the Operations resource to return. -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *ZoneOperationsService) Wait(project string, zone string, operation string) *ZoneOperationsWaitCall { +// - operation: Name of the Operations resource to return, or its unique +// numeric identifier. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *ZoneOperationsService) Wait(project string, zone string, operationid string) *ZoneOperationsWaitCall { c := &ZoneOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.operation = operation + c.operationid = operationid return c } @@ -49544,7 +49550,7 @@ func (c *ZoneOperationsWaitCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "operation": c.operation, + "operation": c.operationid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 1f6e9adab23..66819344202 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20240708", + "revision": "20240722", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -4109,7 +4109,7 @@ "id": "EnterpriseConfig", "properties": { "clusterTier": { - "description": "Output only. cluster_tier specifies the premium tier of the cluster.", + "description": "Output only. cluster_tier indicates the effective tier of the cluster.", "enum": [ "CLUSTER_TIER_UNSPECIFIED", "STANDARD", diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 50fed970a39..69e91b17e2e 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -2080,7 +2080,7 @@ type Empty struct { // EnterpriseConfig: EnterpriseConfig is the cluster enterprise configuration. type EnterpriseConfig struct { - // ClusterTier: Output only. cluster_tier specifies the premium tier of the + // ClusterTier: Output only. cluster_tier indicates the effective tier of the // cluster. // // Possible values: diff --git a/containeranalysis/v1/containeranalysis-api.json b/containeranalysis/v1/containeranalysis-api.json index 15ae1236309..51dcb8cb5c0 100644 --- a/containeranalysis/v1/containeranalysis-api.json +++ b/containeranalysis/v1/containeranalysis-api.json @@ -118,6 +118,92 @@ "resources": { "notes": { "methods": { + "batchCreate": { + "description": "Creates new notes in batch.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes:batchCreate", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.notes.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which the notes are to be created.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/notes:batchCreate", + "request": { + "$ref": "BatchCreateNotesRequest" + }, + "response": { + "$ref": "BatchCreateNotesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a new note.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.notes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "noteId": { + "description": "Required. The ID to use for this note.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which the note is to be created.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/notes", + "request": { + "$ref": "Note" + }, + "response": { + "$ref": "Note" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified note.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}", + "httpMethod": "DELETE", + "id": "containeranalysis.projects.locations.notes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets the specified note.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}", @@ -183,6 +269,40 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "patch": { + "description": "Updates the specified note.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}", + "httpMethod": "PATCH", + "id": "containeranalysis.projects.locations.notes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Note" + }, + "response": { + "$ref": "Note" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -235,6 +355,87 @@ }, "occurrences": { "methods": { + "batchCreate": { + "description": "Creates new occurrences in batch.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences:batchCreate", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.occurrences.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrences are to be created.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/occurrences:batchCreate", + "request": { + "$ref": "BatchCreateOccurrencesRequest" + }, + "response": { + "$ref": "BatchCreateOccurrencesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a new occurrence.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.occurrences.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrence is to be created.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/occurrences", + "request": { + "$ref": "Occurrence" + }, + "response": { + "$ref": "Occurrence" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}", + "httpMethod": "DELETE", + "id": "containeranalysis.projects.locations.occurrences.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/occurrences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets the specified occurrence.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}", @@ -355,6 +556,40 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "patch": { + "description": "Updates the specified occurrence.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}", + "httpMethod": "PATCH", + "id": "containeranalysis.projects.locations.occurrences.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/occurrences/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Occurrence" + }, + "response": { + "$ref": "Occurrence" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1072,7 +1307,7 @@ } } }, - "revision": "20240704", + "revision": "20240726", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { diff --git a/containeranalysis/v1/containeranalysis-gen.go b/containeranalysis/v1/containeranalysis-gen.go index a9ac30fa692..5c33c598bc4 100644 --- a/containeranalysis/v1/containeranalysis-gen.go +++ b/containeranalysis/v1/containeranalysis-gen.go @@ -6329,6 +6329,314 @@ func (s WindowsUpdate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type ProjectsLocationsNotesBatchCreateCall struct { + s *Service + parent string + batchcreatenotesrequest *BatchCreateNotesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreate: Creates new notes in batch. +// +// - parent: The name of the project in the form of `projects/[PROJECT_ID]`, +// under which the notes are to be created. +func (r *ProjectsLocationsNotesService) BatchCreate(parent string, batchcreatenotesrequest *BatchCreateNotesRequest) *ProjectsLocationsNotesBatchCreateCall { + c := &ProjectsLocationsNotesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchcreatenotesrequest = batchcreatenotesrequest + 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 *ProjectsLocationsNotesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesBatchCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsNotesBatchCreateCall { + 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 *ProjectsLocationsNotesBatchCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesBatchCreateCall) 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.batchcreatenotesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notes:batchCreate") + 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 "containeranalysis.projects.locations.notes.batchCreate" call. +// Any non-2xx status code is an error. Response headers are in either +// *BatchCreateNotesResponse.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 *ProjectsLocationsNotesBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreateNotesResponse, 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 := &BatchCreateNotesResponse{ + 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 ProjectsLocationsNotesCreateCall struct { + s *Service + parent string + note *Note + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new note. +// +// - parent: The name of the project in the form of `projects/[PROJECT_ID]`, +// under which the note is to be created. +func (r *ProjectsLocationsNotesService) Create(parent string, note *Note) *ProjectsLocationsNotesCreateCall { + c := &ProjectsLocationsNotesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.note = note + return c +} + +// NoteId sets the optional parameter "noteId": Required. The ID to use for +// this note. +func (c *ProjectsLocationsNotesCreateCall) NoteId(noteId string) *ProjectsLocationsNotesCreateCall { + c.urlParams_.Set("noteId", noteId) + 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 *ProjectsLocationsNotesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesCreateCall) Context(ctx context.Context) *ProjectsLocationsNotesCreateCall { + 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 *ProjectsLocationsNotesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesCreateCall) 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.note) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notes") + 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 "containeranalysis.projects.locations.notes.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Note.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 *ProjectsLocationsNotesCreateCall) Do(opts ...googleapi.CallOption) (*Note, 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 := &Note{ + 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 ProjectsLocationsNotesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified note. +// +// - name: The name of the note in the form of +// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. +func (r *ProjectsLocationsNotesService) Delete(name string) *ProjectsLocationsNotesDeleteCall { + c := &ProjectsLocationsNotesDeleteCall{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 +// details. +func (c *ProjectsLocationsNotesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotesDeleteCall { + 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 *ProjectsLocationsNotesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "containeranalysis.projects.locations.notes.delete" call. +// 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 *ProjectsLocationsNotesDeleteCall) 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 +} + type ProjectsLocationsNotesGetCall struct { s *Service name string @@ -6338,20 +6646,409 @@ type ProjectsLocationsNotesGetCall struct { header_ http.Header } -// Get: Gets the specified note. +// Get: Gets the specified note. +// +// - name: The name of the note in the form of +// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. +func (r *ProjectsLocationsNotesService) Get(name string) *ProjectsLocationsNotesGetCall { + c := &ProjectsLocationsNotesGetCall{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 +// details. +func (c *ProjectsLocationsNotesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsNotesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesGetCall) Context(ctx context.Context) *ProjectsLocationsNotesGetCall { + 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 *ProjectsLocationsNotesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "containeranalysis.projects.locations.notes.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Note.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 *ProjectsLocationsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, 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 := &Note{ + 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 ProjectsLocationsNotesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists notes for the specified project. +// +// - parent: The name of the project to list notes for in the form of +// `projects/[PROJECT_ID]`. +func (r *ProjectsLocationsNotesService) List(parent string) *ProjectsLocationsNotesListCall { + c := &ProjectsLocationsNotesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter expression. +func (c *ProjectsLocationsNotesListCall) Filter(filter string) *ProjectsLocationsNotesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of notes to return +// in the list. Must be positive. Max allowed page size is 1000. If not +// specified, page size defaults to 20. +func (c *ProjectsLocationsNotesListCall) PageSize(pageSize int64) *ProjectsLocationsNotesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to provide to skip +// to a particular spot in the list. +func (c *ProjectsLocationsNotesListCall) PageToken(pageToken string) *ProjectsLocationsNotesListCall { + 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 +// details. +func (c *ProjectsLocationsNotesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsNotesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesListCall) Context(ctx context.Context) *ProjectsLocationsNotesListCall { + 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 *ProjectsLocationsNotesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/notes") + 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 "containeranalysis.projects.locations.notes.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListNotesResponse.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 *ProjectsLocationsNotesListCall) Do(opts ...googleapi.CallOption) (*ListNotesResponse, 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 := &ListNotesResponse{ + 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 +} + +// 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 *ProjectsLocationsNotesListCall) Pages(ctx context.Context, f func(*ListNotesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsNotesPatchCall struct { + s *Service + name string + note *Note + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified note. +// +// - name: The name of the note in the form of +// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. +func (r *ProjectsLocationsNotesService) Patch(name string, note *Note) *ProjectsLocationsNotesPatchCall { + c := &ProjectsLocationsNotesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.note = note + return c +} + +// UpdateMask sets the optional parameter "updateMask": The fields to update. +func (c *ProjectsLocationsNotesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNotesPatchCall { + 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 +// details. +func (c *ProjectsLocationsNotesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesPatchCall) Context(ctx context.Context) *ProjectsLocationsNotesPatchCall { + 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 *ProjectsLocationsNotesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesPatchCall) 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.note) + if err != nil { + return nil, err + } + 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 "containeranalysis.projects.locations.notes.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Note.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 *ProjectsLocationsNotesPatchCall) Do(opts ...googleapi.CallOption) (*Note, 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 := &Note{ + 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 ProjectsLocationsNotesOccurrencesListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists occurrences referencing the specified note. Provider projects +// can use this method to get all occurrences across consumer projects +// referencing the specified note. // -// - name: The name of the note in the form of +// - name: The name of the note to list occurrences for in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. -func (r *ProjectsLocationsNotesService) Get(name string) *ProjectsLocationsNotesGetCall { - c := &ProjectsLocationsNotesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotesOccurrencesService) List(name string) *ProjectsLocationsNotesOccurrencesListCall { + c := &ProjectsLocationsNotesOccurrencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The filter expression. +func (c *ProjectsLocationsNotesOccurrencesListCall) Filter(filter string) *ProjectsLocationsNotesOccurrencesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of occurrences to +// return in the list. +func (c *ProjectsLocationsNotesOccurrencesListCall) PageSize(pageSize int64) *ProjectsLocationsNotesOccurrencesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to provide to skip +// to a particular spot in the list. +func (c *ProjectsLocationsNotesOccurrencesListCall) PageToken(pageToken string) *ProjectsLocationsNotesOccurrencesListCall { + 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 // details. -func (c *ProjectsLocationsNotesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesGetCall { +func (c *ProjectsLocationsNotesOccurrencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesOccurrencesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6359,27 +7056,27 @@ func (c *ProjectsLocationsNotesGetCall) Fields(s ...googleapi.Field) *ProjectsLo // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesGetCall { +func (c *ProjectsLocationsNotesOccurrencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesOccurrencesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotesGetCall) Context(ctx context.Context) *ProjectsLocationsNotesGetCall { +func (c *ProjectsLocationsNotesOccurrencesListCall) Context(ctx context.Context) *ProjectsLocationsNotesOccurrencesListCall { 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 *ProjectsLocationsNotesGetCall) Header() http.Header { +func (c *ProjectsLocationsNotesOccurrencesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotesOccurrencesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -6387,7 +7084,7 @@ func (c *ProjectsLocationsNotesGetCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil 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/{+name}/occurrences") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6400,12 +7097,13 @@ func (c *ProjectsLocationsNotesGetCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "containeranalysis.projects.locations.notes.get" call. +// Do executes the "containeranalysis.projects.locations.notes.occurrences.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Note.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 *ProjectsLocationsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, error) { +// *ListNoteOccurrencesResponse.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 *ProjectsLocationsNotesOccurrencesListCall) Do(opts ...googleapi.CallOption) (*ListNoteOccurrencesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6424,7 +7122,7 @@ func (c *ProjectsLocationsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Note{ + ret := &ListNoteOccurrencesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6437,88 +7135,185 @@ func (c *ProjectsLocationsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, return ret, nil } -type ProjectsLocationsNotesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsNotesOccurrencesListCall) Pages(ctx context.Context, f func(*ListNoteOccurrencesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// List: Lists notes for the specified project. +type ProjectsLocationsOccurrencesBatchCreateCall struct { + s *Service + parent string + batchcreateoccurrencesrequest *BatchCreateOccurrencesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreate: Creates new occurrences in batch. // -// - parent: The name of the project to list notes for in the form of -// `projects/[PROJECT_ID]`. -func (r *ProjectsLocationsNotesService) List(parent string) *ProjectsLocationsNotesListCall { - c := &ProjectsLocationsNotesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The name of the project in the form of `projects/[PROJECT_ID]`, +// under which the occurrences are to be created. +func (r *ProjectsLocationsOccurrencesService) BatchCreate(parent string, batchcreateoccurrencesrequest *BatchCreateOccurrencesRequest) *ProjectsLocationsOccurrencesBatchCreateCall { + c := &ProjectsLocationsOccurrencesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.batchcreateoccurrencesrequest = batchcreateoccurrencesrequest return c } -// Filter sets the optional parameter "filter": The filter expression. -func (c *ProjectsLocationsNotesListCall) Filter(filter string) *ProjectsLocationsNotesListCall { - c.urlParams_.Set("filter", filter) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsOccurrencesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesBatchCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageSize sets the optional parameter "pageSize": Number of notes to return -// in the list. Must be positive. Max allowed page size is 1000. If not -// specified, page size defaults to 20. -func (c *ProjectsLocationsNotesListCall) PageSize(pageSize int64) *ProjectsLocationsNotesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOccurrencesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesBatchCreateCall { + c.ctx_ = ctx return c } -// PageToken sets the optional parameter "pageToken": Token to provide to skip -// to a particular spot in the list. -func (c *ProjectsLocationsNotesListCall) PageToken(pageToken string) *ProjectsLocationsNotesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOccurrencesBatchCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOccurrencesBatchCreateCall) 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.batchcreateoccurrencesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/occurrences:batchCreate") + 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 "containeranalysis.projects.locations.occurrences.batchCreate" call. +// Any non-2xx status code is an error. Response headers are in either +// *BatchCreateOccurrencesResponse.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 *ProjectsLocationsOccurrencesBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreateOccurrencesResponse, 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 := &BatchCreateOccurrencesResponse{ + 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 ProjectsLocationsOccurrencesCreateCall struct { + s *Service + parent string + occurrence *Occurrence + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new occurrence. +// +// - parent: The name of the project in the form of `projects/[PROJECT_ID]`, +// under which the occurrence is to be created. +func (r *ProjectsLocationsOccurrencesService) Create(parent string, occurrence *Occurrence) *ProjectsLocationsOccurrencesCreateCall { + c := &ProjectsLocationsOccurrencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.occurrence = occurrence 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 *ProjectsLocationsNotesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesListCall { +func (c *ProjectsLocationsOccurrencesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotesListCall) Context(ctx context.Context) *ProjectsLocationsNotesListCall { +func (c *ProjectsLocationsOccurrencesCreateCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesCreateCall { 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 *ProjectsLocationsNotesListCall) Header() http.Header { +func (c *ProjectsLocationsOccurrencesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsOccurrencesCreateCall) 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.occurrence) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/occurrences") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -6529,13 +7324,12 @@ func (c *ProjectsLocationsNotesListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "containeranalysis.projects.locations.notes.list" call. +// Do executes the "containeranalysis.projects.locations.occurrences.create" call. // Any non-2xx status code is an error. Response headers are in either -// *ListNotesResponse.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 *ProjectsLocationsNotesListCall) Do(opts ...googleapi.CallOption) (*ListNotesResponse, error) { +// *Occurrence.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 *ProjectsLocationsOccurrencesCreateCall) Do(opts ...googleapi.CallOption) (*Occurrence, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6554,7 +7348,7 @@ func (c *ProjectsLocationsNotesListCall) Do(opts ...googleapi.CallOption) (*List if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListNotesResponse{ + ret := &Occurrence{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6567,110 +7361,57 @@ func (c *ProjectsLocationsNotesListCall) Do(opts ...googleapi.CallOption) (*List return ret, nil } -// 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 *ProjectsLocationsNotesListCall) Pages(ctx context.Context, f func(*ListNotesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ProjectsLocationsNotesOccurrencesListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOccurrencesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists occurrences referencing the specified note. Provider projects -// can use this method to get all occurrences across consumer projects -// referencing the specified note. +// Delete: Deletes the specified occurrence. For example, use this method to +// delete an occurrence when the occurrence is no longer applicable for the +// given resource. // -// - name: The name of the note to list occurrences for in the form of -// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. -func (r *ProjectsLocationsNotesOccurrencesService) List(name string) *ProjectsLocationsNotesOccurrencesListCall { - c := &ProjectsLocationsNotesOccurrencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the occurrence in the form of +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. +func (r *ProjectsLocationsOccurrencesService) Delete(name string) *ProjectsLocationsOccurrencesDeleteCall { + c := &ProjectsLocationsOccurrencesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The filter expression. -func (c *ProjectsLocationsNotesOccurrencesListCall) Filter(filter string) *ProjectsLocationsNotesOccurrencesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Number of occurrences to -// return in the list. -func (c *ProjectsLocationsNotesOccurrencesListCall) PageSize(pageSize int64) *ProjectsLocationsNotesOccurrencesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Token to provide to skip -// to a particular spot in the list. -func (c *ProjectsLocationsNotesOccurrencesListCall) PageToken(pageToken string) *ProjectsLocationsNotesOccurrencesListCall { - 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 // details. -func (c *ProjectsLocationsNotesOccurrencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesOccurrencesListCall { +func (c *ProjectsLocationsOccurrencesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotesOccurrencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesOccurrencesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotesOccurrencesListCall) Context(ctx context.Context) *ProjectsLocationsNotesOccurrencesListCall { +func (c *ProjectsLocationsOccurrencesDeleteCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesDeleteCall { 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 *ProjectsLocationsNotesOccurrencesListCall) Header() http.Header { +func (c *ProjectsLocationsOccurrencesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotesOccurrencesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOccurrencesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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}/occurrences") + 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 } @@ -6681,13 +7422,12 @@ func (c *ProjectsLocationsNotesOccurrencesListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "containeranalysis.projects.locations.notes.occurrences.list" call. +// Do executes the "containeranalysis.projects.locations.occurrences.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *ListNoteOccurrencesResponse.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 *ProjectsLocationsNotesOccurrencesListCall) Do(opts ...googleapi.CallOption) (*ListNoteOccurrencesResponse, error) { +// *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 *ProjectsLocationsOccurrencesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6706,7 +7446,7 @@ func (c *ProjectsLocationsNotesOccurrencesListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListNoteOccurrencesResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6719,27 +7459,6 @@ func (c *ProjectsLocationsNotesOccurrencesListCall) Do(opts ...googleapi.CallOpt return ret, nil } -// 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 *ProjectsLocationsNotesOccurrencesListCall) Pages(ctx context.Context, f func(*ListNoteOccurrencesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ProjectsLocationsOccurrencesGetCall struct { s *Service name string @@ -7225,6 +7944,114 @@ func (c *ProjectsLocationsOccurrencesListCall) Pages(ctx context.Context, f func } } +type ProjectsLocationsOccurrencesPatchCall struct { + s *Service + name string + occurrence *Occurrence + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified occurrence. +// +// - name: The name of the occurrence in the form of +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. +func (r *ProjectsLocationsOccurrencesService) Patch(name string, occurrence *Occurrence) *ProjectsLocationsOccurrencesPatchCall { + c := &ProjectsLocationsOccurrencesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.occurrence = occurrence + return c +} + +// UpdateMask sets the optional parameter "updateMask": The fields to update. +func (c *ProjectsLocationsOccurrencesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsOccurrencesPatchCall { + 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 +// details. +func (c *ProjectsLocationsOccurrencesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOccurrencesPatchCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesPatchCall { + 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 *ProjectsLocationsOccurrencesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOccurrencesPatchCall) 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.occurrence) + if err != nil { + return nil, err + } + 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 "containeranalysis.projects.locations.occurrences.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Occurrence.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 *ProjectsLocationsOccurrencesPatchCall) Do(opts ...googleapi.CallOption) (*Occurrence, 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 := &Occurrence{ + 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 ProjectsLocationsResourcesExportSBOMCall struct { s *Service name string diff --git a/containeranalysis/v1beta1/containeranalysis-api.json b/containeranalysis/v1beta1/containeranalysis-api.json index c1be0320f81..24fd8c7514f 100644 --- a/containeranalysis/v1beta1/containeranalysis-api.json +++ b/containeranalysis/v1beta1/containeranalysis-api.json @@ -118,6 +118,92 @@ "resources": { "notes": { "methods": { + "batchCreate": { + "description": "Creates new notes in batch.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/notes:batchCreate", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.notes.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which the notes are to be created.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/notes:batchCreate", + "request": { + "$ref": "BatchCreateNotesRequest" + }, + "response": { + "$ref": "BatchCreateNotesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a new note.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/notes", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.notes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "noteId": { + "description": "Required. The ID to use for this note.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which the note is to be created.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/notes", + "request": { + "$ref": "Note" + }, + "response": { + "$ref": "Note" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified note.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}", + "httpMethod": "DELETE", + "id": "containeranalysis.projects.locations.notes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets the specified note.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}", @@ -183,6 +269,40 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "patch": { + "description": "Updates the specified note.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}", + "httpMethod": "PATCH", + "id": "containeranalysis.projects.locations.notes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "Note" + }, + "response": { + "$ref": "Note" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -235,6 +355,87 @@ }, "occurrences": { "methods": { + "batchCreate": { + "description": "Creates new occurrences in batch.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/occurrences:batchCreate", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.occurrences.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrences are to be created.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/occurrences:batchCreate", + "request": { + "$ref": "BatchCreateOccurrencesRequest" + }, + "response": { + "$ref": "BatchCreateOccurrencesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a new occurrence.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/occurrences", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.occurrences.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrence is to be created.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/occurrences", + "request": { + "$ref": "Occurrence" + }, + "response": { + "$ref": "Occurrence" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}", + "httpMethod": "DELETE", + "id": "containeranalysis.projects.locations.occurrences.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/occurrences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets the specified occurrence.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}", @@ -355,6 +556,40 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "patch": { + "description": "Updates the specified occurrence.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}", + "httpMethod": "PATCH", + "id": "containeranalysis.projects.locations.occurrences.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/occurrences/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "Occurrence" + }, + "response": { + "$ref": "Occurrence" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1128,7 +1363,7 @@ } } }, - "revision": "20240704", + "revision": "20240726", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { diff --git a/containeranalysis/v1beta1/containeranalysis-gen.go b/containeranalysis/v1beta1/containeranalysis-gen.go index 103610a5421..21b9143ae12 100644 --- a/containeranalysis/v1beta1/containeranalysis-gen.go +++ b/containeranalysis/v1beta1/containeranalysis-gen.go @@ -6511,6 +6511,314 @@ func (s WindowsDetail) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type ProjectsLocationsNotesBatchCreateCall struct { + s *Service + parent string + batchcreatenotesrequest *BatchCreateNotesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreate: Creates new notes in batch. +// +// - parent: The name of the project in the form of `projects/[PROJECT_ID]`, +// under which the notes are to be created. +func (r *ProjectsLocationsNotesService) BatchCreate(parent string, batchcreatenotesrequest *BatchCreateNotesRequest) *ProjectsLocationsNotesBatchCreateCall { + c := &ProjectsLocationsNotesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchcreatenotesrequest = batchcreatenotesrequest + 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 *ProjectsLocationsNotesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesBatchCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsNotesBatchCreateCall { + 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 *ProjectsLocationsNotesBatchCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesBatchCreateCall) 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.batchcreatenotesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/notes:batchCreate") + 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 "containeranalysis.projects.locations.notes.batchCreate" call. +// Any non-2xx status code is an error. Response headers are in either +// *BatchCreateNotesResponse.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 *ProjectsLocationsNotesBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreateNotesResponse, 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 := &BatchCreateNotesResponse{ + 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 ProjectsLocationsNotesCreateCall struct { + s *Service + parent string + note *Note + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new note. +// +// - parent: The name of the project in the form of `projects/[PROJECT_ID]`, +// under which the note is to be created. +func (r *ProjectsLocationsNotesService) Create(parent string, note *Note) *ProjectsLocationsNotesCreateCall { + c := &ProjectsLocationsNotesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.note = note + return c +} + +// NoteId sets the optional parameter "noteId": Required. The ID to use for +// this note. +func (c *ProjectsLocationsNotesCreateCall) NoteId(noteId string) *ProjectsLocationsNotesCreateCall { + c.urlParams_.Set("noteId", noteId) + 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 *ProjectsLocationsNotesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesCreateCall) Context(ctx context.Context) *ProjectsLocationsNotesCreateCall { + 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 *ProjectsLocationsNotesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesCreateCall) 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.note) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/notes") + 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 "containeranalysis.projects.locations.notes.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Note.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 *ProjectsLocationsNotesCreateCall) Do(opts ...googleapi.CallOption) (*Note, 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 := &Note{ + 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 ProjectsLocationsNotesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified note. +// +// - name: The name of the note in the form of +// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. +func (r *ProjectsLocationsNotesService) Delete(name string) *ProjectsLocationsNotesDeleteCall { + c := &ProjectsLocationsNotesDeleteCall{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 +// details. +func (c *ProjectsLocationsNotesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotesDeleteCall { + 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 *ProjectsLocationsNotesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 "containeranalysis.projects.locations.notes.delete" call. +// 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 *ProjectsLocationsNotesDeleteCall) 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 +} + type ProjectsLocationsNotesGetCall struct { s *Service name string @@ -6520,20 +6828,409 @@ type ProjectsLocationsNotesGetCall struct { header_ http.Header } -// Get: Gets the specified note. +// Get: Gets the specified note. +// +// - name: The name of the note in the form of +// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. +func (r *ProjectsLocationsNotesService) Get(name string) *ProjectsLocationsNotesGetCall { + c := &ProjectsLocationsNotesGetCall{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 +// details. +func (c *ProjectsLocationsNotesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsNotesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesGetCall) Context(ctx context.Context) *ProjectsLocationsNotesGetCall { + 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 *ProjectsLocationsNotesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}") + 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 "containeranalysis.projects.locations.notes.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Note.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 *ProjectsLocationsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, 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 := &Note{ + 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 ProjectsLocationsNotesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists notes for the specified project. +// +// - parent: The name of the project to list notes for in the form of +// `projects/[PROJECT_ID]`. +func (r *ProjectsLocationsNotesService) List(parent string) *ProjectsLocationsNotesListCall { + c := &ProjectsLocationsNotesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter expression. +func (c *ProjectsLocationsNotesListCall) Filter(filter string) *ProjectsLocationsNotesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of notes to return +// in the list. Must be positive. Max allowed page size is 1000. If not +// specified, page size defaults to 20. +func (c *ProjectsLocationsNotesListCall) PageSize(pageSize int64) *ProjectsLocationsNotesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to provide to skip +// to a particular spot in the list. +func (c *ProjectsLocationsNotesListCall) PageToken(pageToken string) *ProjectsLocationsNotesListCall { + 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 +// details. +func (c *ProjectsLocationsNotesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsNotesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesListCall) Context(ctx context.Context) *ProjectsLocationsNotesListCall { + 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 *ProjectsLocationsNotesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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/{+parent}/notes") + 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 "containeranalysis.projects.locations.notes.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListNotesResponse.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 *ProjectsLocationsNotesListCall) Do(opts ...googleapi.CallOption) (*ListNotesResponse, 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 := &ListNotesResponse{ + 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 +} + +// 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 *ProjectsLocationsNotesListCall) Pages(ctx context.Context, f func(*ListNotesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsNotesPatchCall struct { + s *Service + name string + note *Note + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified note. +// +// - name: The name of the note in the form of +// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. +func (r *ProjectsLocationsNotesService) Patch(name string, note *Note) *ProjectsLocationsNotesPatchCall { + c := &ProjectsLocationsNotesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.note = note + return c +} + +// UpdateMask sets the optional parameter "updateMask": The fields to update. +func (c *ProjectsLocationsNotesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNotesPatchCall { + 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 +// details. +func (c *ProjectsLocationsNotesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesPatchCall) Context(ctx context.Context) *ProjectsLocationsNotesPatchCall { + 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 *ProjectsLocationsNotesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesPatchCall) 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.note) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 "containeranalysis.projects.locations.notes.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Note.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 *ProjectsLocationsNotesPatchCall) Do(opts ...googleapi.CallOption) (*Note, 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 := &Note{ + 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 ProjectsLocationsNotesOccurrencesListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists occurrences referencing the specified note. Provider projects +// can use this method to get all occurrences across consumer projects +// referencing the specified note. // -// - name: The name of the note in the form of +// - name: The name of the note to list occurrences for in the form of // `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. -func (r *ProjectsLocationsNotesService) Get(name string) *ProjectsLocationsNotesGetCall { - c := &ProjectsLocationsNotesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotesOccurrencesService) List(name string) *ProjectsLocationsNotesOccurrencesListCall { + c := &ProjectsLocationsNotesOccurrencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The filter expression. +func (c *ProjectsLocationsNotesOccurrencesListCall) Filter(filter string) *ProjectsLocationsNotesOccurrencesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of occurrences to +// return in the list. +func (c *ProjectsLocationsNotesOccurrencesListCall) PageSize(pageSize int64) *ProjectsLocationsNotesOccurrencesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to provide to skip +// to a particular spot in the list. +func (c *ProjectsLocationsNotesOccurrencesListCall) PageToken(pageToken string) *ProjectsLocationsNotesOccurrencesListCall { + 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 // details. -func (c *ProjectsLocationsNotesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesGetCall { +func (c *ProjectsLocationsNotesOccurrencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesOccurrencesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6541,27 +7238,27 @@ func (c *ProjectsLocationsNotesGetCall) Fields(s ...googleapi.Field) *ProjectsLo // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesGetCall { +func (c *ProjectsLocationsNotesOccurrencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesOccurrencesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotesGetCall) Context(ctx context.Context) *ProjectsLocationsNotesGetCall { +func (c *ProjectsLocationsNotesOccurrencesListCall) Context(ctx context.Context) *ProjectsLocationsNotesOccurrencesListCall { 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 *ProjectsLocationsNotesGetCall) Header() http.Header { +func (c *ProjectsLocationsNotesOccurrencesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotesOccurrencesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -6569,7 +7266,7 @@ func (c *ProjectsLocationsNotesGetCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/occurrences") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6582,12 +7279,13 @@ func (c *ProjectsLocationsNotesGetCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "containeranalysis.projects.locations.notes.get" call. +// Do executes the "containeranalysis.projects.locations.notes.occurrences.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Note.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 *ProjectsLocationsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, error) { +// *ListNoteOccurrencesResponse.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 *ProjectsLocationsNotesOccurrencesListCall) Do(opts ...googleapi.CallOption) (*ListNoteOccurrencesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6606,7 +7304,7 @@ func (c *ProjectsLocationsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Note{ + ret := &ListNoteOccurrencesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6619,88 +7317,185 @@ func (c *ProjectsLocationsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, return ret, nil } -type ProjectsLocationsNotesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsNotesOccurrencesListCall) Pages(ctx context.Context, f func(*ListNoteOccurrencesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// List: Lists notes for the specified project. +type ProjectsLocationsOccurrencesBatchCreateCall struct { + s *Service + parent string + batchcreateoccurrencesrequest *BatchCreateOccurrencesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreate: Creates new occurrences in batch. // -// - parent: The name of the project to list notes for in the form of -// `projects/[PROJECT_ID]`. -func (r *ProjectsLocationsNotesService) List(parent string) *ProjectsLocationsNotesListCall { - c := &ProjectsLocationsNotesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The name of the project in the form of `projects/[PROJECT_ID]`, +// under which the occurrences are to be created. +func (r *ProjectsLocationsOccurrencesService) BatchCreate(parent string, batchcreateoccurrencesrequest *BatchCreateOccurrencesRequest) *ProjectsLocationsOccurrencesBatchCreateCall { + c := &ProjectsLocationsOccurrencesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.batchcreateoccurrencesrequest = batchcreateoccurrencesrequest return c } -// Filter sets the optional parameter "filter": The filter expression. -func (c *ProjectsLocationsNotesListCall) Filter(filter string) *ProjectsLocationsNotesListCall { - c.urlParams_.Set("filter", filter) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsOccurrencesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesBatchCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageSize sets the optional parameter "pageSize": Number of notes to return -// in the list. Must be positive. Max allowed page size is 1000. If not -// specified, page size defaults to 20. -func (c *ProjectsLocationsNotesListCall) PageSize(pageSize int64) *ProjectsLocationsNotesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOccurrencesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesBatchCreateCall { + c.ctx_ = ctx return c } -// PageToken sets the optional parameter "pageToken": Token to provide to skip -// to a particular spot in the list. -func (c *ProjectsLocationsNotesListCall) PageToken(pageToken string) *ProjectsLocationsNotesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOccurrencesBatchCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOccurrencesBatchCreateCall) 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.batchcreateoccurrencesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/occurrences:batchCreate") + 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 "containeranalysis.projects.locations.occurrences.batchCreate" call. +// Any non-2xx status code is an error. Response headers are in either +// *BatchCreateOccurrencesResponse.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 *ProjectsLocationsOccurrencesBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreateOccurrencesResponse, 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 := &BatchCreateOccurrencesResponse{ + 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 ProjectsLocationsOccurrencesCreateCall struct { + s *Service + parent string + occurrence *Occurrence + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new occurrence. +// +// - parent: The name of the project in the form of `projects/[PROJECT_ID]`, +// under which the occurrence is to be created. +func (r *ProjectsLocationsOccurrencesService) Create(parent string, occurrence *Occurrence) *ProjectsLocationsOccurrencesCreateCall { + c := &ProjectsLocationsOccurrencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.occurrence = occurrence 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 *ProjectsLocationsNotesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesListCall { +func (c *ProjectsLocationsOccurrencesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotesListCall) Context(ctx context.Context) *ProjectsLocationsNotesListCall { +func (c *ProjectsLocationsOccurrencesCreateCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesCreateCall { 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 *ProjectsLocationsNotesListCall) Header() http.Header { +func (c *ProjectsLocationsOccurrencesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsOccurrencesCreateCall) 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.occurrence) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/notes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/occurrences") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -6711,13 +7506,12 @@ func (c *ProjectsLocationsNotesListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "containeranalysis.projects.locations.notes.list" call. +// Do executes the "containeranalysis.projects.locations.occurrences.create" call. // Any non-2xx status code is an error. Response headers are in either -// *ListNotesResponse.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 *ProjectsLocationsNotesListCall) Do(opts ...googleapi.CallOption) (*ListNotesResponse, error) { +// *Occurrence.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 *ProjectsLocationsOccurrencesCreateCall) Do(opts ...googleapi.CallOption) (*Occurrence, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6736,7 +7530,7 @@ func (c *ProjectsLocationsNotesListCall) Do(opts ...googleapi.CallOption) (*List if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListNotesResponse{ + ret := &Occurrence{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6749,110 +7543,57 @@ func (c *ProjectsLocationsNotesListCall) Do(opts ...googleapi.CallOption) (*List return ret, nil } -// 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 *ProjectsLocationsNotesListCall) Pages(ctx context.Context, f func(*ListNotesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ProjectsLocationsNotesOccurrencesListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOccurrencesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists occurrences referencing the specified note. Provider projects -// can use this method to get all occurrences across consumer projects -// referencing the specified note. +// Delete: Deletes the specified occurrence. For example, use this method to +// delete an occurrence when the occurrence is no longer applicable for the +// given resource. // -// - name: The name of the note to list occurrences for in the form of -// `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. -func (r *ProjectsLocationsNotesOccurrencesService) List(name string) *ProjectsLocationsNotesOccurrencesListCall { - c := &ProjectsLocationsNotesOccurrencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the occurrence in the form of +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. +func (r *ProjectsLocationsOccurrencesService) Delete(name string) *ProjectsLocationsOccurrencesDeleteCall { + c := &ProjectsLocationsOccurrencesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The filter expression. -func (c *ProjectsLocationsNotesOccurrencesListCall) Filter(filter string) *ProjectsLocationsNotesOccurrencesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Number of occurrences to -// return in the list. -func (c *ProjectsLocationsNotesOccurrencesListCall) PageSize(pageSize int64) *ProjectsLocationsNotesOccurrencesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Token to provide to skip -// to a particular spot in the list. -func (c *ProjectsLocationsNotesOccurrencesListCall) PageToken(pageToken string) *ProjectsLocationsNotesOccurrencesListCall { - 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 // details. -func (c *ProjectsLocationsNotesOccurrencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesOccurrencesListCall { +func (c *ProjectsLocationsOccurrencesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsNotesOccurrencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotesOccurrencesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotesOccurrencesListCall) Context(ctx context.Context) *ProjectsLocationsNotesOccurrencesListCall { +func (c *ProjectsLocationsOccurrencesDeleteCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesDeleteCall { 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 *ProjectsLocationsNotesOccurrencesListCall) Header() http.Header { +func (c *ProjectsLocationsOccurrencesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotesOccurrencesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOccurrencesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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}/occurrences") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 } @@ -6863,13 +7604,12 @@ func (c *ProjectsLocationsNotesOccurrencesListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "containeranalysis.projects.locations.notes.occurrences.list" call. +// Do executes the "containeranalysis.projects.locations.occurrences.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *ListNoteOccurrencesResponse.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 *ProjectsLocationsNotesOccurrencesListCall) Do(opts ...googleapi.CallOption) (*ListNoteOccurrencesResponse, error) { +// *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 *ProjectsLocationsOccurrencesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6888,7 +7628,7 @@ func (c *ProjectsLocationsNotesOccurrencesListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListNoteOccurrencesResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6901,27 +7641,6 @@ func (c *ProjectsLocationsNotesOccurrencesListCall) Do(opts ...googleapi.CallOpt return ret, nil } -// 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 *ProjectsLocationsNotesOccurrencesListCall) Pages(ctx context.Context, f func(*ListNoteOccurrencesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ProjectsLocationsOccurrencesGetCall struct { s *Service name string @@ -7407,6 +8126,114 @@ func (c *ProjectsLocationsOccurrencesListCall) Pages(ctx context.Context, f func } } +type ProjectsLocationsOccurrencesPatchCall struct { + s *Service + name string + occurrence *Occurrence + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified occurrence. +// +// - name: The name of the occurrence in the form of +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. +func (r *ProjectsLocationsOccurrencesService) Patch(name string, occurrence *Occurrence) *ProjectsLocationsOccurrencesPatchCall { + c := &ProjectsLocationsOccurrencesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.occurrence = occurrence + return c +} + +// UpdateMask sets the optional parameter "updateMask": The fields to update. +func (c *ProjectsLocationsOccurrencesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsOccurrencesPatchCall { + 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 +// details. +func (c *ProjectsLocationsOccurrencesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOccurrencesPatchCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesPatchCall { + 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 *ProjectsLocationsOccurrencesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOccurrencesPatchCall) 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.occurrence) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 "containeranalysis.projects.locations.occurrences.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Occurrence.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 *ProjectsLocationsOccurrencesPatchCall) Do(opts ...googleapi.CallOption) (*Occurrence, 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 := &Occurrence{ + 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 ProjectsLocationsResourcesExportSBOMCall struct { s *Service name string diff --git a/dialogflow/v3/dialogflow-api.json b/dialogflow/v3/dialogflow-api.json index 196159f3707..8701ddf0ae4 100644 --- a/dialogflow/v3/dialogflow-api.json +++ b/dialogflow/v3/dialogflow-api.json @@ -902,7 +902,7 @@ ], "parameters": { "environment": { - "description": "Required. The environment to deploy the flow to. Format: `projects//locations//agents// environments/`.", + "description": "Required. The environment to deploy the flow to. Format: `projects//locations//agents//environments/`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+$", "required": true, @@ -1110,7 +1110,7 @@ "type": "string" }, "parent": { - "description": "Required. The environment to list results for. Format: `projects//locations//agents// environments/`.", + "description": "Required. The environment to list results for. Format: `projects//locations//agents//environments/`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+$", "required": true, @@ -1325,7 +1325,7 @@ ], "parameters": { "name": { - "description": "The name of the experiment. Format: projects//locations//agents//environments//experiments/..", + "description": "The name of the experiment. Format: projects//locations//agents//environments//experiments/.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/environments/[^/]+/experiments/[^/]+$", "required": true, @@ -2396,7 +2396,7 @@ ], "parameters": { "baseVersion": { - "description": "Required. Name of the base flow version to compare with the target version. Use version ID `0` to indicate the draft version of the specified flow. Format: `projects//locations//agents/ /flows//versions/`.", + "description": "Required. Name of the base flow version to compare with the target version. Use version ID `0` to indicate the draft version of the specified flow. Format: `projects//locations//agents//flows//versions/`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/flows/[^/]+/versions/[^/]+$", "required": true, @@ -3382,7 +3382,7 @@ ], "parameters": { "parent": { - "description": "Required. Agent name. Format: `projects//locations//agents/ `.", + "description": "Required. Agent name. Format: `projects//locations//agents/`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+$", "required": true, @@ -3619,7 +3619,7 @@ ], "parameters": { "name": { - "description": "The unique identifier of the test case. TestCases.CreateTestCase will populate the name automatically. Otherwise use format: `projects//locations//agents/ /testCases/`.", + "description": "The unique identifier of the test case. TestCases.CreateTestCase will populate the name automatically. Otherwise use format: `projects//locations//agents//testCases/`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/testCases/[^/]+$", "required": true, @@ -3654,7 +3654,7 @@ ], "parameters": { "name": { - "description": "Required. Format of test case name to run: `projects//locations/ /agents//testCases/`.", + "description": "Required. Format of test case name to run: `projects//locations//agents//testCases/`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/testCases/[^/]+$", "required": true, @@ -3729,7 +3729,7 @@ "type": "string" }, "parent": { - "description": "Required. The test case to list results for. Format: `projects//locations//agents// testCases/`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test cases.", + "description": "Required. The test case to list results for. Format: `projects//locations//agents//testCases/`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test cases.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/testCases/[^/]+$", "required": true, @@ -4453,7 +4453,7 @@ } } }, - "revision": "20240721", + "revision": "20240724", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -4522,7 +4522,7 @@ "type": "boolean" }, "enableStackdriverLogging": { - "description": "Enables StackDriver logging.", + "description": "Enables Google Cloud Logging.", "type": "boolean" } }, @@ -4828,7 +4828,7 @@ "id": "GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest", "properties": { "names": { - "description": "Required. Format of test case names: `projects//locations/ /agents//testCases/`.", + "description": "Required. Format of test case names: `projects//locations//agents//testCases/`.", "items": { "type": "string" }, @@ -5477,7 +5477,7 @@ "id": "GoogleCloudDialogflowCxV3DeployFlowRequest", "properties": { "flowVersion": { - "description": "Required. The flow version to deploy. Format: `projects//locations//agents// flows//versions/`.", + "description": "Required. The flow version to deploy. Format: `projects//locations//agents//flows//versions/`.", "type": "string" } }, @@ -5488,7 +5488,7 @@ "id": "GoogleCloudDialogflowCxV3DeployFlowResponse", "properties": { "deployment": { - "description": "The name of the flow version Deployment. Format: `projects//locations//agents// environments//deployments/`.", + "description": "The name of the flow version Deployment. Format: `projects//locations//agents//environments//deployments/`.", "type": "string" }, "environment": { @@ -5784,7 +5784,7 @@ "type": "boolean" }, "testCases": { - "description": "A list of test case names to run. They should be under the same agent. Format of each test case name: `projects//locations/ /agents//testCases/`", + "description": "A list of test case names to run. They should be under the same agent. Format of each test case name: `projects//locations//agents//testCases/`", "items": { "type": "string" }, @@ -5898,7 +5898,7 @@ "type": "string" }, "name": { - "description": "The name of the experiment. Format: projects//locations//agents//environments//experiments/..", + "description": "The name of the experiment. Format: projects//locations//agents//environments//experiments/.", "type": "string" }, "result": { @@ -6410,6 +6410,10 @@ "$ref": "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings", "description": "Optional. Knowledge connector configuration." }, + "locked": { + "description": "Indicates whether the flow is locked for changes. If the flow is locked, modifications to the flow will be rejected.", + "type": "boolean" + }, "multiLanguageSettings": { "$ref": "GoogleCloudDialogflowCxV3FlowMultiLanguageSettings", "description": "Optional. Multi-lingual agent settings for this flow." @@ -6423,7 +6427,7 @@ "description": "NLU related settings of the flow." }, "transitionRouteGroups": { - "description": "A flow's transition route group serve two purposes: * They are responsible for matching the user's first utterances in the flow. * They are inherited by every page's transition route groups. Transition route groups defined in the page have higher priority than those defined in the flow. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", + "description": "A flow's transition route group serve two purposes: * They are responsible for matching the user's first utterances in the flow. * They are inherited by every page's transition route groups. Transition route groups defined in the page have higher priority than those defined in the flow. Format: `projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", "items": { "type": "string" }, @@ -9165,7 +9169,7 @@ "description": "The latest test result." }, "name": { - "description": "The unique identifier of the test case. TestCases.CreateTestCase will populate the name automatically. Otherwise use format: `projects//locations//agents/ /testCases/`.", + "description": "The unique identifier of the test case. TestCases.CreateTestCase will populate the name automatically. Otherwise use format: `projects//locations//agents//testCases/`.", "type": "string" }, "notes": { @@ -9224,7 +9228,7 @@ "type": "string" }, "name": { - "description": "The resource name for the test case result. Format: `projects//locations//agents//testCases/ /results/`.", + "description": "The resource name for the test case result. Format: `projects//locations//agents//testCases//results/`.", "type": "string" }, "testResult": { @@ -10287,7 +10291,7 @@ "type": "boolean" }, "enableStackdriverLogging": { - "description": "Enables StackDriver logging.", + "description": "Enables Google Cloud Logging.", "type": "boolean" } }, @@ -10601,7 +10605,7 @@ "id": "GoogleCloudDialogflowCxV3beta1DeployFlowResponse", "properties": { "deployment": { - "description": "The name of the flow version deployment. Format: `projects//locations//agents// environments//deployments/`.", + "description": "The name of the flow version deployment. Format: `projects//locations//agents//environments//deployments/`.", "type": "string" }, "environment": { @@ -10679,7 +10683,7 @@ "type": "boolean" }, "testCases": { - "description": "A list of test case names to run. They should be under the same agent. Format of each test case name: `projects//locations/ /agents//testCases/`", + "description": "A list of test case names to run. They should be under the same agent. Format of each test case name: `projects//locations//agents//testCases/`", "items": { "type": "string" }, @@ -11946,7 +11950,7 @@ "description": "The latest test result." }, "name": { - "description": "The unique identifier of the test case. TestCases.CreateTestCase will populate the name automatically. Otherwise use format: `projects//locations//agents/ /testCases/`.", + "description": "The unique identifier of the test case. TestCases.CreateTestCase will populate the name automatically. Otherwise use format: `projects//locations//agents//testCases/`.", "type": "string" }, "notes": { @@ -12005,7 +12009,7 @@ "type": "string" }, "name": { - "description": "The resource name for the test case result. Format: `projects//locations//agents//testCases/ /results/`.", + "description": "The resource name for the test case result. Format: `projects//locations//agents//testCases//results/`.", "type": "string" }, "testResult": { diff --git a/dialogflow/v3/dialogflow-gen.go b/dialogflow/v3/dialogflow-gen.go index 806064998cd..80254110a15 100644 --- a/dialogflow/v3/dialogflow-gen.go +++ b/dialogflow/v3/dialogflow-gen.go @@ -564,7 +564,7 @@ type GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings struct { EnableConsentBasedRedaction bool `json:"enableConsentBasedRedaction,omitempty"` // EnableInteractionLogging: Enables DF Interaction logging. EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` - // EnableStackdriverLogging: Enables StackDriver logging. + // EnableStackdriverLogging: Enables Google Cloud Logging. EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` // ForceSendFields is a list of field names (e.g. // "EnableConsentBasedRedaction") to unconditionally include in API requests. @@ -1013,8 +1013,8 @@ func (s GoogleCloudDialogflowCxV3BargeInConfig) MarshalJSON() ([]byte, error) { // GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest: The request message // for TestCases.BatchDeleteTestCases. type GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest struct { - // Names: Required. Format of test case names: `projects//locations/ - // /agents//testCases/`. + // Names: Required. Format of test case names: + // `projects//locations//agents//testCases/`. Names []string `json:"names,omitempty"` // ForceSendFields is a list of field names (e.g. "Names") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -1904,7 +1904,7 @@ func (s GoogleCloudDialogflowCxV3DeployFlowMetadata) MarshalJSON() ([]byte, erro // Environments.DeployFlow. type GoogleCloudDialogflowCxV3DeployFlowRequest struct { // FlowVersion: Required. The flow version to deploy. Format: - // `projects//locations//agents// flows//versions/`. + // `projects//locations//agents//flows//versions/`. FlowVersion string `json:"flowVersion,omitempty"` // ForceSendFields is a list of field names (e.g. "FlowVersion") to // unconditionally include in API requests. By default, fields with empty or @@ -1928,7 +1928,7 @@ func (s GoogleCloudDialogflowCxV3DeployFlowRequest) MarshalJSON() ([]byte, error // Environments.DeployFlow. type GoogleCloudDialogflowCxV3DeployFlowResponse struct { // Deployment: The name of the flow version Deployment. Format: - // `projects//locations//agents// environments//deployments/`. + // `projects//locations//agents//environments//deployments/`. Deployment string `json:"deployment,omitempty"` // Environment: The updated environment where the flow is deployed. Environment *GoogleCloudDialogflowCxV3Environment `json:"environment,omitempty"` @@ -2330,8 +2330,8 @@ type GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig struct { // environment. Default false. EnablePredeploymentRun bool `json:"enablePredeploymentRun,omitempty"` // TestCases: A list of test case names to run. They should be under the same - // agent. Format of each test case name: `projects//locations/ - // /agents//testCases/` + // agent. Format of each test case name: + // `projects//locations//agents//testCases/` TestCases []string `json:"testCases,omitempty"` // ForceSendFields is a list of field names (e.g. "EnableContinuousRun") to // unconditionally include in API requests. By default, fields with empty or @@ -2486,7 +2486,7 @@ type GoogleCloudDialogflowCxV3Experiment struct { // LastUpdateTime: Last update time of this experiment. LastUpdateTime string `json:"lastUpdateTime,omitempty"` // Name: The name of the experiment. Format: - // projects//locations//agents//environments//experiments/.. + // projects//locations//agents//environments//experiments/. Name string `json:"name,omitempty"` // Result: Inference result of the experiment. Result *GoogleCloudDialogflowCxV3ExperimentResult `json:"result,omitempty"` @@ -3197,6 +3197,9 @@ type GoogleCloudDialogflowCxV3Flow struct { EventHandlers []*GoogleCloudDialogflowCxV3EventHandler `json:"eventHandlers,omitempty"` // KnowledgeConnectorSettings: Optional. Knowledge connector configuration. KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3KnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + // Locked: Indicates whether the flow is locked for changes. If the flow is + // locked, modifications to the flow will be rejected. + Locked bool `json:"locked,omitempty"` // MultiLanguageSettings: Optional. Multi-lingual agent settings for this flow. MultiLanguageSettings *GoogleCloudDialogflowCxV3FlowMultiLanguageSettings `json:"multiLanguageSettings,omitempty"` // Name: The unique identifier of the flow. Format: @@ -3208,8 +3211,8 @@ type GoogleCloudDialogflowCxV3Flow struct { // They are responsible for matching the user's first utterances in the flow. * // They are inherited by every page's transition route groups. Transition route // groups defined in the page have higher priority than those defined in the - // flow. Format:`projects//locations//agents//flows//transitionRouteGroups/` or - // `projects//locations//agents//transitionRouteGroups/` for agent-level + // flow. Format: `projects//locations//agents//flows//transitionRouteGroups/` + // or `projects//locations//agents//transitionRouteGroups/` for agent-level // groups. TransitionRouteGroups []string `json:"transitionRouteGroups,omitempty"` // TransitionRoutes: A flow's transition routes serve two purposes: * They are @@ -7340,7 +7343,7 @@ type GoogleCloudDialogflowCxV3TestCase struct { LastTestResult *GoogleCloudDialogflowCxV3TestCaseResult `json:"lastTestResult,omitempty"` // Name: The unique identifier of the test case. TestCases.CreateTestCase will // populate the name automatically. Otherwise use format: - // `projects//locations//agents/ /testCases/`. + // `projects//locations//agents//testCases/`. Name string `json:"name,omitempty"` // Notes: Additional freeform notes about the test case. Limit of 400 // characters. @@ -7410,7 +7413,7 @@ type GoogleCloudDialogflowCxV3TestCaseResult struct { // the draft environment. Environment string `json:"environment,omitempty"` // Name: The resource name for the test case result. Format: - // `projects//locations//agents//testCases/ /results/`. + // `projects//locations//agents//testCases//results/`. Name string `json:"name,omitempty"` // TestResult: Whether the test case passed in the agent environment. // @@ -8829,7 +8832,7 @@ type GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings struct { EnableConsentBasedRedaction bool `json:"enableConsentBasedRedaction,omitempty"` // EnableInteractionLogging: Enables DF Interaction logging. EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` - // EnableStackdriverLogging: Enables StackDriver logging. + // EnableStackdriverLogging: Enables Google Cloud Logging. EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` // ForceSendFields is a list of field names (e.g. // "EnableConsentBasedRedaction") to unconditionally include in API requests. @@ -9298,7 +9301,7 @@ func (s GoogleCloudDialogflowCxV3beta1DeployFlowMetadata) MarshalJSON() ([]byte, // Environments.DeployFlow. type GoogleCloudDialogflowCxV3beta1DeployFlowResponse struct { // Deployment: The name of the flow version deployment. Format: - // `projects//locations//agents// environments//deployments/`. + // `projects//locations//agents//environments//deployments/`. Deployment string `json:"deployment,omitempty"` // Environment: The updated environment where the flow is deployed. Environment *GoogleCloudDialogflowCxV3beta1Environment `json:"environment,omitempty"` @@ -9403,8 +9406,8 @@ type GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig struct { // environment. Default false. EnablePredeploymentRun bool `json:"enablePredeploymentRun,omitempty"` // TestCases: A list of test case names to run. They should be under the same - // agent. Format of each test case name: `projects//locations/ - // /agents//testCases/` + // agent. Format of each test case name: + // `projects//locations//agents//testCases/` TestCases []string `json:"testCases,omitempty"` // ForceSendFields is a list of field names (e.g. "EnableContinuousRun") to // unconditionally include in API requests. By default, fields with empty or @@ -11350,7 +11353,7 @@ type GoogleCloudDialogflowCxV3beta1TestCase struct { LastTestResult *GoogleCloudDialogflowCxV3beta1TestCaseResult `json:"lastTestResult,omitempty"` // Name: The unique identifier of the test case. TestCases.CreateTestCase will // populate the name automatically. Otherwise use format: - // `projects//locations//agents/ /testCases/`. + // `projects//locations//agents//testCases/`. Name string `json:"name,omitempty"` // Notes: Additional freeform notes about the test case. Limit of 400 // characters. @@ -11418,7 +11421,7 @@ type GoogleCloudDialogflowCxV3beta1TestCaseResult struct { // the draft environment. Environment string `json:"environment,omitempty"` // Name: The resource name for the test case result. Format: - // `projects//locations//agents//testCases/ /results/`. + // `projects//locations//agents//testCases//results/`. Name string `json:"name,omitempty"` // TestResult: Whether the test case passed in the agent environment. // @@ -22213,7 +22216,7 @@ type ProjectsLocationsAgentsEnvironmentsDeployFlowCall struct { // `metadata`: DeployFlowMetadata - `response`: DeployFlowResponse // // - environment: The environment to deploy the flow to. Format: -// `projects//locations//agents// environments/`. +// `projects//locations//agents//environments/`. func (r *ProjectsLocationsAgentsEnvironmentsService) DeployFlow(environment string, googleclouddialogflowcxv3deployflowrequest *GoogleCloudDialogflowCxV3DeployFlowRequest) *ProjectsLocationsAgentsEnvironmentsDeployFlowCall { c := &ProjectsLocationsAgentsEnvironmentsDeployFlowCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.environment = environment @@ -22936,7 +22939,7 @@ type ProjectsLocationsAgentsEnvironmentsContinuousTestResultsListCall struct { // List: Fetches a list of continuous test results for a given environment. // // - parent: The environment to list results for. Format: -// `projects//locations//agents// environments/`. +// `projects//locations//agents//environments/`. func (r *ProjectsLocationsAgentsEnvironmentsContinuousTestResultsService) List(parent string) *ProjectsLocationsAgentsEnvironmentsContinuousTestResultsListCall { c := &ProjectsLocationsAgentsEnvironmentsContinuousTestResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -23786,7 +23789,7 @@ type ProjectsLocationsAgentsEnvironmentsExperimentsPatchCall struct { // Patch: Updates the specified Experiment. // // - name: The name of the experiment. Format: -// projects//locations//agents//environments//experiments/.. +// projects//locations//agents//environments//experiments/. func (r *ProjectsLocationsAgentsEnvironmentsExperimentsService) Patch(name string, googleclouddialogflowcxv3experiment *GoogleCloudDialogflowCxV3Experiment) *ProjectsLocationsAgentsEnvironmentsExperimentsPatchCall { c := &ProjectsLocationsAgentsEnvironmentsExperimentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -27639,7 +27642,7 @@ type ProjectsLocationsAgentsFlowsVersionsCompareVersionsCall struct { // // - baseVersion: Name of the base flow version to compare with the target // version. Use version ID `0` to indicate the draft version of the specified -// flow. Format: `projects//locations//agents/ /flows//versions/`. +// flow. Format: `projects//locations//agents//flows//versions/`. func (r *ProjectsLocationsAgentsFlowsVersionsService) CompareVersions(baseVersion string, googleclouddialogflowcxv3compareversionsrequest *GoogleCloudDialogflowCxV3CompareVersionsRequest) *ProjectsLocationsAgentsFlowsVersionsCompareVersionsCall { c := &ProjectsLocationsAgentsFlowsVersionsCompareVersionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.baseVersion = baseVersion @@ -31113,7 +31116,7 @@ type ProjectsLocationsAgentsTestCasesBatchRunCall struct { // `metadata`: BatchRunTestCasesMetadata - `response`: // BatchRunTestCasesResponse // -// - parent: Agent name. Format: `projects//locations//agents/ `. +// - parent: Agent name. Format: `projects//locations//agents/`. func (r *ProjectsLocationsAgentsTestCasesService) BatchRun(parent string, googleclouddialogflowcxv3batchruntestcasesrequest *GoogleCloudDialogflowCxV3BatchRunTestCasesRequest) *ProjectsLocationsAgentsTestCasesBatchRunCall { c := &ProjectsLocationsAgentsTestCasesBatchRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -31934,7 +31937,7 @@ type ProjectsLocationsAgentsTestCasesPatchCall struct { // // - name: The unique identifier of the test case. TestCases.CreateTestCase // will populate the name automatically. Otherwise use format: -// `projects//locations//agents/ /testCases/`. +// `projects//locations//agents//testCases/`. func (r *ProjectsLocationsAgentsTestCasesService) Patch(nameid string, googleclouddialogflowcxv3testcase *GoogleCloudDialogflowCxV3TestCase) *ProjectsLocationsAgentsTestCasesPatchCall { c := &ProjectsLocationsAgentsTestCasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.nameid = nameid @@ -32047,8 +32050,8 @@ type ProjectsLocationsAgentsTestCasesRunCall struct { // The returned `Operation` type has the following method-specific fields: - // `metadata`: RunTestCaseMetadata - `response`: RunTestCaseResponse // -// - name: Format of test case name to run: `projects//locations/ -// /agents//testCases/`. +// - name: Format of test case name to run: +// `projects//locations//agents//testCases/`. func (r *ProjectsLocationsAgentsTestCasesService) Run(name string, googleclouddialogflowcxv3runtestcaserequest *GoogleCloudDialogflowCxV3RunTestCaseRequest) *ProjectsLocationsAgentsTestCasesRunCall { c := &ProjectsLocationsAgentsTestCasesRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -32261,8 +32264,8 @@ type ProjectsLocationsAgentsTestCasesResultsListCall struct { // 100 results are kept for each test case. // // - parent: The test case to list results for. Format: -// `projects//locations//agents// testCases/`. Specify a `-` as a wildcard -// for TestCase ID to list results across multiple test cases. +// `projects//locations//agents//testCases/`. Specify a `-` as a wildcard for +// TestCase ID to list results across multiple test cases. func (r *ProjectsLocationsAgentsTestCasesResultsService) List(parent string) *ProjectsLocationsAgentsTestCasesResultsListCall { c := &ProjectsLocationsAgentsTestCasesResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 0e19b009e57..8d64dce2743 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20240724", + "revision": "20240730", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -251,6 +251,12 @@ "description": "A response candidate generated from the model.", "id": "GoogleCloudAiplatformV1beta1Candidate", "properties": { + "avgLogprobs": { + "description": "Output only. Average log probability score of the candidate.", + "format": "double", + "readOnly": true, + "type": "number" + }, "citationMetadata": { "$ref": "GoogleCloudAiplatformV1beta1CitationMetadata", "description": "Output only. Source attribution of the generated content.", diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index d771014501a..46ddce5dc60 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -265,6 +265,8 @@ func (s GoogleCloudAiplatformV1beta1Blob) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1beta1Candidate: A response candidate generated from // the model. type GoogleCloudAiplatformV1beta1Candidate struct { + // AvgLogprobs: Output only. Average log probability score of the candidate. + AvgLogprobs float64 `json:"avgLogprobs,omitempty"` // CitationMetadata: Output only. Source attribution of the generated content. CitationMetadata *GoogleCloudAiplatformV1beta1CitationMetadata `json:"citationMetadata,omitempty"` // Content: Output only. Content parts of the candidate. @@ -304,15 +306,15 @@ type GoogleCloudAiplatformV1beta1Candidate struct { // SafetyRatings: Output only. List of ratings for the safety of a response // candidate. There is at most one rating per category. SafetyRatings []*GoogleCloudAiplatformV1beta1SafetyRating `json:"safetyRatings,omitempty"` - // ForceSendFields is a list of field names (e.g. "CitationMetadata") to + // ForceSendFields is a list of field names (e.g. "AvgLogprobs") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CitationMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "AvgLogprobs") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -322,6 +324,20 @@ func (s GoogleCloudAiplatformV1beta1Candidate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudAiplatformV1beta1Candidate) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1Candidate + var s1 struct { + AvgLogprobs gensupport.JSONFloat64 `json:"avgLogprobs"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.AvgLogprobs = float64(s1.AvgLogprobs) + return nil +} + // GoogleCloudAiplatformV1beta1Citation: Source attributions for content. type GoogleCloudAiplatformV1beta1Citation struct { // EndIndex: Output only. End index into the content. diff --git a/healthcare/v1/healthcare-api.json b/healthcare/v1/healthcare-api.json index b0e16e4a727..75b352bf36f 100644 --- a/healthcare/v1/healthcare-api.json +++ b/healthcare/v1/healthcare-api.json @@ -4109,6 +4109,35 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "rollback": { + "description": "Rolls back messages from the HL7 store to the specified time. This method returns an Operation that can be used to track the status of the rollback by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when the operation finishes, a detailed response of type RollbackHl7V2MessagesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:rollback", + "httpMethod": "POST", + "id": "healthcare.projects.locations.datasets.hl7V2Stores.rollback", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the HL7v2 store to rollback, in the format of \"projects/{project_id}/locations/{location_id}/datasets/{dataset_id} /hl7V2Stores/{hl7v2_store_id}\".", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:rollback", + "request": { + "$ref": "RollbackHl7V2MessagesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-healthcare", + "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}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:setIamPolicy", @@ -4554,7 +4583,7 @@ } } }, - "revision": "20240718", + "revision": "20240731", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -7188,6 +7217,82 @@ }, "type": "object" }, + "RollbackHL7MessagesFilteringFields": { + "description": "Filtering fields for an HL7 rollback. Currently only supports a list of operation ids to roll back.", + "id": "RollbackHL7MessagesFilteringFields", + "properties": { + "operationIds": { + "description": "Optional. A list of operation IDs to roll back.", + "items": { + "format": "uint64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RollbackHl7V2MessagesRequest": { + "description": "Point in time recovery rollback request.", + "id": "RollbackHl7V2MessagesRequest", + "properties": { + "changeType": { + "description": "Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns of a certain type.", + "enum": [ + "CHANGE_TYPE_UNSPECIFIED", + "ALL", + "CREATE", + "UPDATE", + "DELETE" + ], + "enumDescriptions": [ + "When unspecified, revert all transactions", + "All transactions", + "Revert only CREATE transactions", + "Revert only Update transactions", + "Revert only Delete transactions" + ], + "type": "string" + }, + "excludeRollbacks": { + "description": "Optional. Specifies whether to exclude earlier rollbacks.", + "type": "boolean" + }, + "filteringFields": { + "$ref": "RollbackHL7MessagesFilteringFields", + "description": "Optional. Parameters for filtering." + }, + "force": { + "description": "Optional. When enabled, changes will be reverted without explicit confirmation.", + "type": "boolean" + }, + "inputGcsObject": { + "description": "Optional. Cloud storage object containing list of {resourceId} lines, identifying resources to be reverted", + "type": "string" + }, + "resultGcsBucket": { + "description": "Required. Bucket to deposit result", + "type": "string" + }, + "rollbackTime": { + "description": "Required. Times point to rollback to.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "RollbackHl7V2MessagesResponse": { + "description": "Final response of rollback HL7v2 messages request.", + "id": "RollbackHl7V2MessagesResponse", + "properties": { + "hl7v2Store": { + "description": "The name of the HL7 store to rollback, in the format of \"projects/{project_id}/locations/{location_id}/datasets/{dataset_id} /hl7v2Stores/{hl7v2_store_id}\".", + "type": "string" + } + }, + "type": "object" + }, "SchemaConfig": { "description": "Configuration for the FHIR BigQuery schema. Determines how the server generates the schema.", "id": "SchemaConfig", diff --git a/healthcare/v1/healthcare-gen.go b/healthcare/v1/healthcare-gen.go index 6c15bee2e2f..bddbb9a606a 100644 --- a/healthcare/v1/healthcare-gen.go +++ b/healthcare/v1/healthcare-gen.go @@ -4697,6 +4697,98 @@ func (s RollbackFhirResourcesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RollbackHL7MessagesFilteringFields: Filtering fields for an HL7 rollback. +// Currently only supports a list of operation ids to roll back. +type RollbackHL7MessagesFilteringFields struct { + // OperationIds: Optional. A list of operation IDs to roll back. + OperationIds googleapi.Uint64s `json:"operationIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "OperationIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OperationIds") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RollbackHL7MessagesFilteringFields) MarshalJSON() ([]byte, error) { + type NoMethod RollbackHL7MessagesFilteringFields + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RollbackHl7V2MessagesRequest: Point in time recovery rollback request. +type RollbackHl7V2MessagesRequest struct { + // ChangeType: Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns of a + // certain type. + // + // Possible values: + // "CHANGE_TYPE_UNSPECIFIED" - When unspecified, revert all transactions + // "ALL" - All transactions + // "CREATE" - Revert only CREATE transactions + // "UPDATE" - Revert only Update transactions + // "DELETE" - Revert only Delete transactions + ChangeType string `json:"changeType,omitempty"` + // ExcludeRollbacks: Optional. Specifies whether to exclude earlier rollbacks. + ExcludeRollbacks bool `json:"excludeRollbacks,omitempty"` + // FilteringFields: Optional. Parameters for filtering. + FilteringFields *RollbackHL7MessagesFilteringFields `json:"filteringFields,omitempty"` + // Force: Optional. When enabled, changes will be reverted without explicit + // confirmation. + Force bool `json:"force,omitempty"` + // InputGcsObject: Optional. Cloud storage object containing list of + // {resourceId} lines, identifying resources to be reverted + InputGcsObject string `json:"inputGcsObject,omitempty"` + // ResultGcsBucket: Required. Bucket to deposit result + ResultGcsBucket string `json:"resultGcsBucket,omitempty"` + // RollbackTime: Required. Times point to rollback to. + RollbackTime string `json:"rollbackTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChangeType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChangeType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RollbackHl7V2MessagesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RollbackHl7V2MessagesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RollbackHl7V2MessagesResponse: Final response of rollback HL7v2 messages +// request. +type RollbackHl7V2MessagesResponse struct { + // Hl7v2Store: The name of the HL7 store to rollback, in the format of + // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id} + // /hl7v2Stores/{hl7v2_store_id}". + Hl7v2Store string `json:"hl7v2Store,omitempty"` + // ForceSendFields is a list of field names (e.g. "Hl7v2Store") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Hl7v2Store") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RollbackHl7V2MessagesResponse) MarshalJSON() ([]byte, error) { + type NoMethod RollbackHl7V2MessagesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SchemaConfig: Configuration for the FHIR BigQuery schema. Determines how the // server generates the schema. type SchemaConfig struct { @@ -19235,6 +19327,116 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Do(opts ...googleapi.Cal return ret, nil } +type ProjectsLocationsDatasetsHl7V2StoresRollbackCall struct { + s *Service + name string + rollbackhl7v2messagesrequest *RollbackHl7V2MessagesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Rollback: Rolls back messages from the HL7 store to the specified time. This +// method returns an Operation that can be used to track the status of the +// rollback by calling GetOperation. Immediate fatal errors appear in the error +// field, errors are also logged to Cloud Logging (see Viewing error logs in +// Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)). +// Otherwise, when the operation finishes, a detailed response of type +// RollbackHl7V2MessagesResponse is returned in the response field. The +// metadata field type for this operation is OperationMetadata. +// +// - name: The name of the HL7v2 store to rollback, in the format of +// "projects/{project_id}/locations/{location_id}/datasets/{dataset_id} +// /hl7V2Stores/{hl7v2_store_id}". +func (r *ProjectsLocationsDatasetsHl7V2StoresService) Rollback(name string, rollbackhl7v2messagesrequest *RollbackHl7V2MessagesRequest) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall { + c := &ProjectsLocationsDatasetsHl7V2StoresRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rollbackhl7v2messagesrequest = rollbackhl7v2messagesrequest + 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 *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall { + 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 *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) 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.rollbackhl7v2messagesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rollback") + 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 "healthcare.projects.locations.datasets.hl7V2Stores.rollback" 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 *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) 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 ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall struct { s *Service resource string diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 68eee2f31da..0ffd84a7183 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -5174,6 +5174,35 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "rollback": { + "description": "Rolls back messages from the HL7 store to the specified time. This method returns an Operation that can be used to track the status of the rollback by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when the operation finishes, a detailed response of type RollbackHl7V2MessagesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:rollback", + "httpMethod": "POST", + "id": "healthcare.projects.locations.datasets.hl7V2Stores.rollback", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the HL7v2 store to rollback, in the format of \"projects/{project_id}/locations/{location_id}/datasets/{dataset_id} /hl7V2Stores/{hl7v2_store_id}\".", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:rollback", + "request": { + "$ref": "RollbackHl7V2MessagesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-healthcare", + "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}/datasets/{datasetsId}/hl7V2Stores/{hl7V2StoresId}:setIamPolicy", @@ -5672,7 +5701,7 @@ } } }, - "revision": "20240718", + "revision": "20240731", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { @@ -9607,6 +9636,82 @@ }, "type": "object" }, + "RollbackHL7MessagesFilteringFields": { + "description": "Filtering fields for an HL7 rollback. Currently only supports a list of operation ids to roll back.", + "id": "RollbackHL7MessagesFilteringFields", + "properties": { + "operationIds": { + "description": "Optional. A list of operation IDs to roll back.", + "items": { + "format": "uint64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RollbackHl7V2MessagesRequest": { + "description": "Point in time recovery rollback request.", + "id": "RollbackHl7V2MessagesRequest", + "properties": { + "changeType": { + "description": "Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns of a certain type.", + "enum": [ + "CHANGE_TYPE_UNSPECIFIED", + "ALL", + "CREATE", + "UPDATE", + "DELETE" + ], + "enumDescriptions": [ + "When unspecified, revert all transactions", + "All transactions", + "Revert only CREATE transactions", + "Revert only Update transactions", + "Revert only Delete transactions" + ], + "type": "string" + }, + "excludeRollbacks": { + "description": "Optional. Specifies whether to exclude earlier rollbacks.", + "type": "boolean" + }, + "filteringFields": { + "$ref": "RollbackHL7MessagesFilteringFields", + "description": "Optional. Parameters for filtering." + }, + "force": { + "description": "Optional. When enabled, changes will be reverted without explicit confirmation.", + "type": "boolean" + }, + "inputGcsObject": { + "description": "Optional. Cloud storage object containing list of {resourceId} lines, identifying resources to be reverted", + "type": "string" + }, + "resultGcsBucket": { + "description": "Required. Bucket to deposit result", + "type": "string" + }, + "rollbackTime": { + "description": "Required. Times point to rollback to.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "RollbackHl7V2MessagesResponse": { + "description": "Final response of rollback FHIR resources request.", + "id": "RollbackHl7V2MessagesResponse", + "properties": { + "hl7v2Store": { + "description": "The name of the HL7 store to rollback, in the format of \"projects/{project_id}/locations/{location_id}/datasets/{dataset_id} /hl7v2Stores/{fhir_store_id}\".", + "type": "string" + } + }, + "type": "object" + }, "SchemaConfig": { "description": "Configuration for the FHIR BigQuery schema. Determines how the server generates the schema.", "id": "SchemaConfig", diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 25440d6e94c..682f69b2676 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -6657,6 +6657,98 @@ func (s RollbackFhirResourcesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RollbackHL7MessagesFilteringFields: Filtering fields for an HL7 rollback. +// Currently only supports a list of operation ids to roll back. +type RollbackHL7MessagesFilteringFields struct { + // OperationIds: Optional. A list of operation IDs to roll back. + OperationIds googleapi.Uint64s `json:"operationIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "OperationIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OperationIds") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RollbackHL7MessagesFilteringFields) MarshalJSON() ([]byte, error) { + type NoMethod RollbackHL7MessagesFilteringFields + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RollbackHl7V2MessagesRequest: Point in time recovery rollback request. +type RollbackHl7V2MessagesRequest struct { + // ChangeType: Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns of a + // certain type. + // + // Possible values: + // "CHANGE_TYPE_UNSPECIFIED" - When unspecified, revert all transactions + // "ALL" - All transactions + // "CREATE" - Revert only CREATE transactions + // "UPDATE" - Revert only Update transactions + // "DELETE" - Revert only Delete transactions + ChangeType string `json:"changeType,omitempty"` + // ExcludeRollbacks: Optional. Specifies whether to exclude earlier rollbacks. + ExcludeRollbacks bool `json:"excludeRollbacks,omitempty"` + // FilteringFields: Optional. Parameters for filtering. + FilteringFields *RollbackHL7MessagesFilteringFields `json:"filteringFields,omitempty"` + // Force: Optional. When enabled, changes will be reverted without explicit + // confirmation. + Force bool `json:"force,omitempty"` + // InputGcsObject: Optional. Cloud storage object containing list of + // {resourceId} lines, identifying resources to be reverted + InputGcsObject string `json:"inputGcsObject,omitempty"` + // ResultGcsBucket: Required. Bucket to deposit result + ResultGcsBucket string `json:"resultGcsBucket,omitempty"` + // RollbackTime: Required. Times point to rollback to. + RollbackTime string `json:"rollbackTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChangeType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChangeType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RollbackHl7V2MessagesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RollbackHl7V2MessagesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RollbackHl7V2MessagesResponse: Final response of rollback FHIR resources +// request. +type RollbackHl7V2MessagesResponse struct { + // Hl7v2Store: The name of the HL7 store to rollback, in the format of + // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id} + // /hl7v2Stores/{fhir_store_id}". + Hl7v2Store string `json:"hl7v2Store,omitempty"` + // ForceSendFields is a list of field names (e.g. "Hl7v2Store") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Hl7v2Store") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RollbackHl7V2MessagesResponse) MarshalJSON() ([]byte, error) { + type NoMethod RollbackHl7V2MessagesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SchemaConfig: Configuration for the FHIR BigQuery schema. Determines how the // server generates the schema. type SchemaConfig struct { @@ -25132,6 +25224,116 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Do(opts ...googleapi.Cal return ret, nil } +type ProjectsLocationsDatasetsHl7V2StoresRollbackCall struct { + s *Service + name string + rollbackhl7v2messagesrequest *RollbackHl7V2MessagesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Rollback: Rolls back messages from the HL7 store to the specified time. This +// method returns an Operation that can be used to track the status of the +// rollback by calling GetOperation. Immediate fatal errors appear in the error +// field, errors are also logged to Cloud Logging (see Viewing error logs in +// Cloud Logging (https://cloud.google.com/healthcare/docs/how-tos/logging)). +// Otherwise, when the operation finishes, a detailed response of type +// RollbackHl7V2MessagesResponse is returned in the response field. The +// metadata field type for this operation is OperationMetadata. +// +// - name: The name of the HL7v2 store to rollback, in the format of +// "projects/{project_id}/locations/{location_id}/datasets/{dataset_id} +// /hl7V2Stores/{hl7v2_store_id}". +func (r *ProjectsLocationsDatasetsHl7V2StoresService) Rollback(name string, rollbackhl7v2messagesrequest *RollbackHl7V2MessagesRequest) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall { + c := &ProjectsLocationsDatasetsHl7V2StoresRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rollbackhl7v2messagesrequest = rollbackhl7v2messagesrequest + 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 *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Context(ctx context.Context) *ProjectsLocationsDatasetsHl7V2StoresRollbackCall { + 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 *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) 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.rollbackhl7v2messagesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rollback") + 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 "healthcare.projects.locations.datasets.hl7V2Stores.rollback" 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 *ProjectsLocationsDatasetsHl7V2StoresRollbackCall) 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 ProjectsLocationsDatasetsHl7V2StoresSetIamPolicyCall struct { s *Service resource string diff --git a/iam/v1/iam-api.json b/iam/v1/iam-api.json index 777c889cc56..e527addb821 100644 --- a/iam/v1/iam-api.json +++ b/iam/v1/iam-api.json @@ -988,7 +988,7 @@ ] }, "delete": { - "description": "Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are not changed, but they have no effect. * By default, the response from ListRoles does not include the custom role. A deleted custom role still counts toward the [custom role limit](/iam/quotas#limits) until it is permanently deleted. You have 7 days to undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding is permanently removed. * The custom role no longer counts toward your custom role limit.", + "description": "Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are not changed, but they have no effect. * By default, the response from ListRoles does not include the custom role. A deleted custom role still counts toward the [custom role limit](https://cloud.google.com/iam/help/limits) until it is permanently deleted. You have 7 days to undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding is permanently removed. * The custom role no longer counts toward your custom role limit.", "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", "httpMethod": "DELETE", "id": "iam.organizations.roles.delete", @@ -2288,7 +2288,7 @@ ] }, "delete": { - "description": "Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are not changed, but they have no effect. * By default, the response from ListRoles does not include the custom role. A deleted custom role still counts toward the [custom role limit](/iam/quotas#limits) until it is permanently deleted. You have 7 days to undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding is permanently removed. * The custom role no longer counts toward your custom role limit.", + "description": "Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are not changed, but they have no effect. * By default, the response from ListRoles does not include the custom role. A deleted custom role still counts toward the [custom role limit](https://cloud.google.com/iam/help/limits) until it is permanently deleted. You have 7 days to undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding is permanently removed. * The custom role no longer counts toward your custom role limit.", "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", "httpMethod": "DELETE", "id": "iam.projects.roles.delete", @@ -3188,7 +3188,7 @@ } } }, - "revision": "20240722", + "revision": "20240725", "rootUrl": "https://iam.googleapis.com/", "schemas": { "AccessRestrictions": { @@ -4418,7 +4418,7 @@ "type": "string" }, "pageSize": { - "description": "Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 1,000.", + "description": "Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 2,000.", "format": "int32", "type": "integer" }, diff --git a/iam/v1/iam-gen.go b/iam/v1/iam-gen.go index 8e1cdbb10dc..dc431241388 100644 --- a/iam/v1/iam-gen.go +++ b/iam/v1/iam-gen.go @@ -2431,7 +2431,7 @@ type QueryGrantableRolesRequest struct { // `//cloudresourcemanager.googleapis.com/projects/my-project`. FullResourceName string `json:"fullResourceName,omitempty"` // PageSize: Optional limit on the number of roles to include in the response. - // The default is 300, and the maximum is 1,000. + // The default is 300, and the maximum is 2,000. PageSize int64 `json:"pageSize,omitempty"` // PageToken: Optional pagination token returned in an earlier // QueryGrantableRolesResponse. @@ -6933,12 +6933,12 @@ type OrganizationsRolesDeleteCall struct { // in an IAM Policy. * Existing bindings to the custom role are not changed, // but they have no effect. * By default, the response from ListRoles does not // include the custom role. A deleted custom role still counts toward the -// custom role limit (/iam/quotas#limits) until it is permanently deleted. You -// have 7 days to undelete the custom role. After 7 days, the following changes -// occur: * The custom role is permanently deleted and cannot be recovered. * -// If an IAM policy contains a binding to the custom role, the binding is -// permanently removed. * The custom role no longer counts toward your custom -// role limit. +// custom role limit (https://cloud.google.com/iam/help/limits) until it is +// permanently deleted. You have 7 days to undelete the custom role. After 7 +// days, the following changes occur: * The custom role is permanently deleted +// and cannot be recovered. * If an IAM policy contains a binding to the custom +// role, the binding is permanently removed. * The custom role no longer counts +// toward your custom role limit. // // - name: The `name` parameter's value depends on the target resource for the // request, namely projects @@ -11708,12 +11708,12 @@ type ProjectsRolesDeleteCall struct { // in an IAM Policy. * Existing bindings to the custom role are not changed, // but they have no effect. * By default, the response from ListRoles does not // include the custom role. A deleted custom role still counts toward the -// custom role limit (/iam/quotas#limits) until it is permanently deleted. You -// have 7 days to undelete the custom role. After 7 days, the following changes -// occur: * The custom role is permanently deleted and cannot be recovered. * -// If an IAM policy contains a binding to the custom role, the binding is -// permanently removed. * The custom role no longer counts toward your custom -// role limit. +// custom role limit (https://cloud.google.com/iam/help/limits) until it is +// permanently deleted. You have 7 days to undelete the custom role. After 7 +// days, the following changes occur: * The custom role is permanently deleted +// and cannot be recovered. * If an IAM policy contains a binding to the custom +// role, the binding is permanently removed. * The custom role no longer counts +// toward your custom role limit. // // - name: The `name` parameter's value depends on the target resource for the // request, namely projects diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index 503022016b7..df25ad8a9b5 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -8424,7 +8424,7 @@ } } }, - "revision": "20240705", + "revision": "20240726", "rootUrl": "https://logging.googleapis.com/", "schemas": { "AuditConfig": { @@ -8982,7 +8982,7 @@ "type": "string" }, "fieldPath": { - "description": "Required. The LogEntry field path to index.Note that some paths are automatically indexed, and other paths are not eligible for indexing. See indexing documentation( https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) for details.For example: jsonPayload.request.status", + "description": "Required. The LogEntry field path to index.Note that some paths are automatically indexed, and other paths are not eligible for indexing. See indexing documentation( https://cloud.google.com/logging/docs/analyze/custom-index) for details.For example: jsonPayload.request.status", "type": "string" }, "type": { @@ -9252,7 +9252,7 @@ "type": "array" }, "resourceNames": { - "description": "Required. Names of one or more parent resources from which to retrieve log entries: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]May alternatively be one or more views: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]Projects listed in the project_ids field are added to this list. A maximum of 100 resources may be specified in a single request.", + "description": "Required. Names of one or more parent resources from which to retrieve log entries. Resources may either be resource containers or specific LogViews. For the case of resource containers, all logs ingested into that container will be returned regardless of which LogBuckets they are actually stored in - i.e. these queries may fan out to multiple regions. In the event of region unavailability, specify a specific set of LogViews that do not include the unavailable region. projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]Projects listed in the project_ids field are added to this list. A maximum of 100 resources may be specified in a single request.", "items": { "type": "string" }, diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index cb01b218587..59047a820b3 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -1816,8 +1816,8 @@ type IndexConfig struct { // FieldPath: Required. The LogEntry field path to index.Note that some paths // are automatically indexed, and other paths are not eligible for indexing. // See indexing documentation( - // https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) - // for details.For example: jsonPayload.request.status + // https://cloud.google.com/logging/docs/analyze/custom-index) for details.For + // example: jsonPayload.request.status FieldPath string `json:"fieldPath,omitempty"` // Type: Required. The type of data in this index. // @@ -2179,9 +2179,14 @@ type ListLogEntriesRequest struct { // Example: "my-project-1A". ProjectIds []string `json:"projectIds,omitempty"` // ResourceNames: Required. Names of one or more parent resources from which to - // retrieve log entries: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] - // billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]May alternatively be - // one or more views: + // retrieve log entries. Resources may either be resource containers or + // specific LogViews. For the case of resource containers, all logs ingested + // into that container will be returned regardless of which LogBuckets they are + // actually stored in - i.e. these queries may fan out to multiple regions. In + // the event of region unavailability, specify a specific set of LogViews that + // do not include the unavailable region. projects/[PROJECT_ID] + // organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] + // folders/[FOLDER_ID] // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW // _ID] // organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v diff --git a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json index 5e10093f7d3..f39885e41f8 100644 --- a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json +++ b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json @@ -2653,7 +2653,7 @@ } } }, - "revision": "20240520", + "revision": "20240730", "rootUrl": "https://prod-tt-sasportal.googleapis.com/", "schemas": { "SasPortalAssignment": { @@ -2862,7 +2862,8 @@ "DOODLE_CBRS", "CW", "REDLINE", - "TARANA_WIRELESS" + "TARANA_WIRELESS", + "FAROS" ], "enumDescriptions": [ "", @@ -2873,6 +2874,7 @@ "", "", "", + "", "" ], "type": "string" diff --git a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go index 1bffdadbfa2..d859a65695e 100644 --- a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go +++ b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go @@ -653,6 +653,7 @@ type SasPortalDeviceAirInterface struct { // "CW" // "REDLINE" // "TARANA_WIRELESS" + // "FAROS" RadioTechnology string `json:"radioTechnology,omitempty"` // SupportedSpec: Optional. This field is related to the `radioTechnology` and // provides the air interface specification that the CBSD is compliant with at diff --git a/realtimebidding/v1/realtimebidding-api.json b/realtimebidding/v1/realtimebidding-api.json index 5b7fad5236b..e46105cab4d 100644 --- a/realtimebidding/v1/realtimebidding-api.json +++ b/realtimebidding/v1/realtimebidding-api.json @@ -1305,7 +1305,7 @@ } } }, - "revision": "20240320", + "revision": "20240801", "rootUrl": "https://realtimebidding.googleapis.com/", "schemas": { "ActivatePretargetingConfigRequest": { @@ -2898,14 +2898,16 @@ "HOSTED_MATCH_DATA", "GOOGLE_COOKIE", "DEVICE_ID", - "PUBLISHER_PROVIDED_ID" + "PUBLISHER_PROVIDED_ID", + "PUBLISHER_FIRST_PARTY_ID" ], "enumDescriptions": [ "Placeholder for unspecified user identifier.", "Hosted match data, referring to hosted_match_data in the bid request.", "Google cookie, referring to google_user_id in the bid request.", "Mobile device advertising ID.", - "The request has a publisher-provided ID available to the bidder." + "The request has a publisher-provided ID available to the bidder.", + "Publisher first party ID, scoped to a single site, app or vendor needs to be present on the bid request." ], "type": "string" }, diff --git a/realtimebidding/v1/realtimebidding-gen.go b/realtimebidding/v1/realtimebidding-gen.go index b0de6f1ec36..dca027540c6 100644 --- a/realtimebidding/v1/realtimebidding-gen.go +++ b/realtimebidding/v1/realtimebidding-gen.go @@ -2050,6 +2050,8 @@ type PretargetingConfig struct { // "DEVICE_ID" - Mobile device advertising ID. // "PUBLISHER_PROVIDED_ID" - The request has a publisher-provided ID // available to the bidder. + // "PUBLISHER_FIRST_PARTY_ID" - Publisher first party ID, scoped to a single + // site, app or vendor needs to be present on the bid request. IncludedUserIdTypes []string `json:"includedUserIdTypes,omitempty"` // InterstitialTargeting: The interstitial targeting specified for this // configuration. The unset value will allow bid requests to be sent regardless