diff --git a/advisorynotifications/v1/advisorynotifications-api.json b/advisorynotifications/v1/advisorynotifications-api.json index b5885b3fe7d..6e4b5033b8a 100644 --- a/advisorynotifications/v1/advisorynotifications-api.json +++ b/advisorynotifications/v1/advisorynotifications-api.json @@ -119,7 +119,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.", + "description": "Required. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/settings$", "required": true, @@ -144,7 +144,7 @@ ], "parameters": { "name": { - "description": "Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.", + "description": "Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/settings$", "required": true, @@ -222,7 +222,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent, which owns this collection of notifications. Must be of the form \"organizations/{organization}/locations/{location}\" or \"projects/{project}/locations/{location}\"", + "description": "Required. The parent, which owns this collection of notifications. Must be of the form \"organizations/{organization}/locations/{location}\" or \"projects/{project}/locations/{location}\".", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -261,6 +261,61 @@ "projects": { "resources": { "locations": { + "methods": { + "getSettings": { + "description": "Get notification settings.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/settings", + "httpMethod": "GET", + "id": "advisorynotifications.projects.locations.getSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/settings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudAdvisorynotificationsV1Settings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateSettings": { + "description": "Update notification settings.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/settings", + "httpMethod": "PATCH", + "id": "advisorynotifications.projects.locations.updateSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/settings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudAdvisorynotificationsV1Settings" + }, + "response": { + "$ref": "GoogleCloudAdvisorynotificationsV1Settings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "notifications": { "methods": { @@ -320,7 +375,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent, which owns this collection of notifications. Must be of the form \"organizations/{organization}/locations/{location}\" or \"projects/{project}/locations/{location}\"", + "description": "Required. The parent, which owns this collection of notifications. Must be of the form \"organizations/{organization}/locations/{location}\" or \"projects/{project}/locations/{location}\".", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -357,7 +412,7 @@ } } }, - "revision": "20231203", + "revision": "20240331", "rootUrl": "https://advisorynotifications.googleapis.com/", "schemas": { "GoogleCloudAdvisorynotificationsV1Attachment": { @@ -538,7 +593,7 @@ "type": "string" }, "name": { - "description": "Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.", + "description": "Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.", "type": "string" }, "notificationSettings": { diff --git a/advisorynotifications/v1/advisorynotifications-gen.go b/advisorynotifications/v1/advisorynotifications-gen.go index cf60b16a318..2421d8f3f3e 100644 --- a/advisorynotifications/v1/advisorynotifications-gen.go +++ b/advisorynotifications/v1/advisorynotifications-gen.go @@ -523,7 +523,8 @@ type GoogleCloudAdvisorynotificationsV1Settings struct { Etag string `json:"etag,omitempty"` // Name: Identifier. The resource name of the settings to retrieve. - // Format: organizations/{organization}/locations/{location}/settings. + // Format: organizations/{organization}/locations/{location}/settings or + // projects/{projects}/locations/{location}/settings. Name string `json:"name,omitempty"` // NotificationSettings: Required. Map of each notification type and its @@ -649,7 +650,8 @@ type OrganizationsLocationsGetSettingsCall struct { // GetSettings: Get notification settings. // // - name: The resource name of the settings to retrieve. Format: -// organizations/{organization}/locations/{location}/settings. +// organizations/{organization}/locations/{location}/settings or +// projects/{projects}/locations/{location}/settings. func (r *OrganizationsLocationsService) GetSettings(name string) *OrganizationsLocationsGetSettingsCall { c := &OrganizationsLocationsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -766,7 +768,7 @@ func (c *OrganizationsLocationsGetSettingsCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.", + // "description": "Required. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/settings$", // "required": true, @@ -798,7 +800,8 @@ type OrganizationsLocationsUpdateSettingsCall struct { // UpdateSettings: Update notification settings. // // - name: Identifier. The resource name of the settings to retrieve. -// Format: organizations/{organization}/locations/{location}/settings. +// Format: organizations/{organization}/locations/{location}/settings +// or projects/{projects}/locations/{location}/settings. func (r *OrganizationsLocationsService) UpdateSettings(name string, googlecloudadvisorynotificationsv1settings *GoogleCloudAdvisorynotificationsV1Settings) *OrganizationsLocationsUpdateSettingsCall { c := &OrganizationsLocationsUpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -908,7 +911,7 @@ func (c *OrganizationsLocationsUpdateSettingsCall) Do(opts ...googleapi.CallOpti // ], // "parameters": { // "name": { - // "description": "Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.", + // "description": "Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/settings$", // "required": true, @@ -1298,7 +1301,7 @@ func (c *OrganizationsLocationsNotificationsListCall) Do(opts ...googleapi.CallO // "type": "string" // }, // "parent": { - // "description": "Required. The parent, which owns this collection of notifications. Must be of the form \"organizations/{organization}/locations/{location}\" or \"projects/{project}/locations/{location}\"", + // "description": "Required. The parent, which owns this collection of notifications. Must be of the form \"organizations/{organization}/locations/{location}\" or \"projects/{project}/locations/{location}\".", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, @@ -1352,6 +1355,302 @@ func (c *OrganizationsLocationsNotificationsListCall) Pages(ctx context.Context, } } +// method id "advisorynotifications.projects.locations.getSettings": + +type ProjectsLocationsGetSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetSettings: Get notification settings. +// +// - name: The resource name of the settings to retrieve. Format: +// organizations/{organization}/locations/{location}/settings or +// projects/{projects}/locations/{location}/settings. +func (r *ProjectsLocationsService) GetSettings(name string) *ProjectsLocationsGetSettingsCall { + c := &ProjectsLocationsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetSettingsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetSettingsCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetSettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetSettingsCall) Context(ctx context.Context) *ProjectsLocationsGetSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "advisorynotifications.projects.locations.getSettings" call. +// Exactly one of *GoogleCloudAdvisorynotificationsV1Settings or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAdvisorynotificationsV1Settings.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 *ProjectsLocationsGetSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1Settings, 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 := &GoogleCloudAdvisorynotificationsV1Settings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get notification settings.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/settings", + // "httpMethod": "GET", + // "id": "advisorynotifications.projects.locations.getSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/settings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudAdvisorynotificationsV1Settings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "advisorynotifications.projects.locations.updateSettings": + +type ProjectsLocationsUpdateSettingsCall struct { + s *Service + name string + googlecloudadvisorynotificationsv1settings *GoogleCloudAdvisorynotificationsV1Settings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateSettings: Update notification settings. +// +// - name: Identifier. The resource name of the settings to retrieve. +// Format: organizations/{organization}/locations/{location}/settings +// or projects/{projects}/locations/{location}/settings. +func (r *ProjectsLocationsService) UpdateSettings(name string, googlecloudadvisorynotificationsv1settings *GoogleCloudAdvisorynotificationsV1Settings) *ProjectsLocationsUpdateSettingsCall { + c := &ProjectsLocationsUpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudadvisorynotificationsv1settings = googlecloudadvisorynotificationsv1settings + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsUpdateSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateSettingsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsUpdateSettingsCall) Context(ctx context.Context) *ProjectsLocationsUpdateSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsUpdateSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUpdateSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudadvisorynotificationsv1settings) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "advisorynotifications.projects.locations.updateSettings" call. +// Exactly one of *GoogleCloudAdvisorynotificationsV1Settings or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAdvisorynotificationsV1Settings.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 *ProjectsLocationsUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1Settings, 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 := &GoogleCloudAdvisorynotificationsV1Settings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update notification settings.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/settings", + // "httpMethod": "PATCH", + // "id": "advisorynotifications.projects.locations.updateSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/settings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudAdvisorynotificationsV1Settings" + // }, + // "response": { + // "$ref": "GoogleCloudAdvisorynotificationsV1Settings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "advisorynotifications.projects.locations.notifications.get": type ProjectsLocationsNotificationsGetCall struct { @@ -1721,7 +2020,7 @@ func (c *ProjectsLocationsNotificationsListCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "parent": { - // "description": "Required. The parent, which owns this collection of notifications. Must be of the form \"organizations/{organization}/locations/{location}\" or \"projects/{project}/locations/{location}\"", + // "description": "Required. The parent, which owns this collection of notifications. Must be of the form \"organizations/{organization}/locations/{location}\" or \"projects/{project}/locations/{location}\".", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 4f8d33d5443..40ec3d46fc4 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -15922,6 +15922,130 @@ } }, "tuningJobs": { + "methods": { + "cancel": { + "description": "Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use GenAiTuningService.GetTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it becomes a job with a TuningJob.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and TuningJob.state is set to `CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tuningJobs/{tuningJobsId}:cancel", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.tuningJobs.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the TuningJob to cancel. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tuningJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleCloudAiplatformV1CancelTuningJobRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a TuningJob. A created TuningJob right away will be attempted to be run.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tuningJobs", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.tuningJobs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the Location to create the TuningJob in. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/tuningJobs", + "request": { + "$ref": "GoogleCloudAiplatformV1TuningJob" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1TuningJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a TuningJob.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tuningJobs/{tuningJobsId}", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.tuningJobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the TuningJob resource. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tuningJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudAiplatformV1TuningJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists TuningJobs in a Location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tuningJobs", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.tuningJobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The standard list filter.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The standard list page token. Typically obtained via ListTuningJob.next_page_token of the previous GenAiTuningService.ListTuningJob][] call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the Location to list the TuningJobs from. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/tuningJobs", + "response": { + "$ref": "GoogleCloudAiplatformV1ListTuningJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "operations": { "methods": { @@ -16080,7 +16204,7 @@ } } }, - "revision": "20240322", + "revision": "20240328", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionEmbedVideoResponse": { @@ -16677,6 +16801,10 @@ "CloudAiNlLlmProtoServiceMessageMetadata": { "id": "CloudAiNlLlmProtoServiceMessageMetadata", "properties": { + "factualityDebugMetadata": { + "$ref": "LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata", + "description": "Factuality-related debug metadata." + }, "inputFilterInfo": { "$ref": "LearningServingLlmMessageMetadata", "description": "Filter metadata of the input messages." @@ -16885,6 +17013,13 @@ }, "type": "array" }, + "translationRequestInfos": { + "description": "Translation request info during RAI for debugging purpose. Each TranslationRequestInfo corresponds to a request sent to the translation server.", + "items": { + "$ref": "LearningGenaiRootTranslationRequestInfo" + }, + "type": "array" + }, "triggeredBlocklist": { "description": "Whether the text triggered the blocklist.", "type": "boolean" @@ -18339,6 +18474,12 @@ "properties": {}, "type": "object" }, + "GoogleCloudAiplatformV1CancelTuningJobRequest": { + "description": "Request message for GenAiTuningService.CancelTuningJob.", + "id": "GoogleCloudAiplatformV1CancelTuningJobRequest", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1Candidate": { "description": "A response candidate generated from the model.", "id": "GoogleCloudAiplatformV1Candidate", @@ -22465,7 +22606,7 @@ "type": "object" }, "GoogleCloudAiplatformV1FindNeighborsRequest": { - "description": "LINT.IfChange The request message for MatchService.FindNeighbors.", + "description": "The request message for MatchService.FindNeighbors.", "id": "GoogleCloudAiplatformV1FindNeighborsRequest", "properties": { "deployedIndexId": { @@ -22813,6 +22954,10 @@ "format": "float", "type": "number" }, + "responseMimeType": { + "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: `text/plain`: (default) Text output. `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", + "type": "string" + }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -22937,13 +23082,6 @@ }, "type": "array" }, - "retrievalQueries": { - "description": "Optional. Queries executed by the retrieval tools.", - "items": { - "type": "string" - }, - "type": "array" - }, "webSearchQueries": { "description": "Optional. Web search queries for the following-up web search.", "items": { @@ -24578,6 +24716,24 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1ListTuningJobsResponse": { + "description": "Response message for GenAiTuningService.ListTuningJobs", + "id": "GoogleCloudAiplatformV1ListTuningJobsResponse", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results. Pass to ListTuningJobsRequest.page_token to obtain that page.", + "type": "string" + }, + "tuningJobs": { + "description": "List of TuningJobs in the requested page.", + "items": { + "$ref": "GoogleCloudAiplatformV1TuningJob" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1LookupStudyRequest": { "description": "Request message for VizierService.LookupStudy.", "id": "GoogleCloudAiplatformV1LookupStudyRequest", @@ -26733,7 +26889,8 @@ "OP_IN_DATAPOINT", "MULTIPLE_VALUES", "INVALID_NUMERIC_VALUE", - "INVALID_ENCODING" + "INVALID_ENCODING", + "INVALID_SPARSE_DIMENSIONS" ], "enumDescriptions": [ "Default, shall not be used.", @@ -26749,7 +26906,8 @@ "Numeric restrict has operator specified in datapoint.", "Numeric restrict has multiple values specified.", "Numeric restrict has invalid numeric value specified.", - "File is not in UTF_8 format." + "File is not in UTF_8 format.", + "Error parsing sparse dimensions field." ], "type": "string" }, @@ -28153,10 +28311,6 @@ "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke", "description": "Optional. Deploy PublisherModel to Google Kubernetes Engine." }, - "multiDeployVertex": { - "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex", - "description": "Optional. Multiple setups to deploy the PublisherModel to Vertex Endpoint." - }, "openEvaluationPipeline": { "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences", "description": "Optional. Open evaluation pipeline of the PublisherModel." @@ -28257,20 +28411,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex": { - "description": "Multiple setups to deploy the PublisherModel.", - "id": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex", - "properties": { - "multiDeployVertex": { - "description": "Optional. One click deployment configurations.", - "items": { - "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionDeploy" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines": { "description": "Open fine tuning pipelines.", "id": "GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines", @@ -28605,41 +28745,10 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1RayMetricSpec": { - "description": "Configuration for the Ray metrics.", - "id": "GoogleCloudAiplatformV1RayMetricSpec", - "properties": { - "disabled": { - "description": "Optional. Flag to disable the Ray metrics collection.", - "type": "boolean" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1RaySpec": { "description": "Configuration information for the Ray cluster. For experimental launch, Ray cluster creation and Persistent cluster creation are 1:1 mapping: We will provision all the nodes within the Persistent cluster as Ray nodes.", "id": "GoogleCloudAiplatformV1RaySpec", - "properties": { - "headNodeResourcePoolId": { - "description": "Optional. This will be used to indicate which resource pool will serve as the Ray head node(the first node within that pool). Will use the machine from the first workerpool as the head node by default if this field isn't set.", - "type": "string" - }, - "imageUri": { - "description": "Optional. Default image for user to choose a preferred ML framework (for example, TensorFlow or Pytorch) by choosing from [Vertex prebuilt images](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). Either this or the resource_pool_images is required. Use this field if you need all the resource pools to have the same Ray image. Otherwise, use the {@code resource_pool_images} field.", - "type": "string" - }, - "rayMetricSpec": { - "$ref": "GoogleCloudAiplatformV1RayMetricSpec", - "description": "Optional. Ray metrics configurations." - }, - "resourcePoolImages": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Required if image_uri isn't set. A map of resource_pool_id to prebuild Ray image if user need to use different images for different head/worker pools. This map needs to cover all the resource pool ids. Example: { \"ray_head_node_pool\": \"head image\" \"ray_worker_node_pool1\": \"worker image\" \"ray_worker_node_pool2\": \"another worker image\" }", - "type": "object" - } - }, + "properties": {}, "type": "object" }, "GoogleCloudAiplatformV1ReadFeatureValuesRequest": { @@ -28962,21 +29071,7 @@ "GoogleCloudAiplatformV1ResourceRuntime": { "description": "Persistent Cluster runtime information as output", "id": "GoogleCloudAiplatformV1ResourceRuntime", - "properties": { - "accessUris": { - "additionalProperties": { - "type": "string" - }, - "description": "Output only. URIs for user to connect to the Cluster. Example: { \"RAY_HEAD_NODE_INTERNAL_IP\": \"head-node-IP:10001\" \"RAY_DASHBOARD_URI\": \"ray-dashboard-address:8888\" }", - "readOnly": true, - "type": "object" - }, - "notebookRuntimeTemplate": { - "description": "Output only. The resource name of NotebookRuntimeTemplate for the RoV Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC (if set), and with the same Ray and Python version as the Persistent Cluster. Example: \"projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123\"", - "readOnly": true, - "type": "string" - } - }, + "properties": {}, "type": "object" }, "GoogleCloudAiplatformV1ResourceRuntimeSpec": { @@ -30140,6 +30235,78 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics": { + "description": "Metrics for general pairwise text generation evaluation results.", + "id": "GoogleCloudAiplatformV1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics", + "properties": { + "accuracy": { + "description": "Fraction of cases where the autorater agreed with the human raters.", + "format": "float", + "type": "number" + }, + "baselineModelWinRate": { + "description": "Percentage of time the autorater decided the baseline model had the better response.", + "format": "float", + "type": "number" + }, + "cohensKappa": { + "description": "A measurement of agreement between the autorater and human raters that takes the likelihood of random agreement into account.", + "format": "float", + "type": "number" + }, + "f1Score": { + "description": "Harmonic mean of precision and recall.", + "format": "float", + "type": "number" + }, + "falseNegativeCount": { + "description": "Number of examples where the autorater chose the baseline model, but humans preferred the model.", + "format": "int64", + "type": "string" + }, + "falsePositiveCount": { + "description": "Number of examples where the autorater chose the model, but humans preferred the baseline model.", + "format": "int64", + "type": "string" + }, + "humanPreferenceBaselineModelWinRate": { + "description": "Percentage of time humans decided the baseline model had the better response.", + "format": "float", + "type": "number" + }, + "humanPreferenceModelWinRate": { + "description": "Percentage of time humans decided the model had the better response.", + "format": "float", + "type": "number" + }, + "modelWinRate": { + "description": "Percentage of time the autorater decided the model had the better response.", + "format": "float", + "type": "number" + }, + "precision": { + "description": "Fraction of cases where the autorater and humans thought the model had a better response out of all cases where the autorater thought the model had a better response. True positive divided by all positive.", + "format": "float", + "type": "number" + }, + "recall": { + "description": "Fraction of cases where the autorater and humans thought the model had a better response out of all cases where the humans thought the model had a better response.", + "format": "float", + "type": "number" + }, + "trueNegativeCount": { + "description": "Number of examples where both the autorater and humans decided that the model had the worse response.", + "format": "int64", + "type": "string" + }, + "truePositiveCount": { + "description": "Number of examples where both the autorater and humans decided that the model had the better response.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1SchemaModelevaluationMetricsQuestionAnsweringEvaluationMetrics": { "id": "GoogleCloudAiplatformV1SchemaModelevaluationMetricsQuestionAnsweringEvaluationMetrics", "properties": { @@ -33501,7 +33668,7 @@ "type": "boolean" }, "serviceAccount": { - "description": "Optional. Default service account that this PersistentResource's workloads run as. The workloads include: * Any runtime specified via `ResourceRuntimeSpec` on creation time, for example, Ray. * Jobs submitted to PersistentResource, if no other service account specified in the job specs. Only works when custom service account is enabled and users have the `iam.serviceAccounts.actAs` permission on this service account. Required if any containers are specified in `ResourceRuntimeSpec`.", + "description": "Optional. Required when all below conditions are met * `enable_custom_service_account` is true; * any runtime is specified via `ResourceRuntimeSpec` on creation time, for example, Ray The users must have `iam.serviceAccounts.actAs` permission on this service account and then the specified runtime containers will run as it. Do not set this field if you want to submit jobs using custom service account to this PersistentResource after creation, but only specify the `service_account` inside the job.", "type": "string" } }, @@ -34276,6 +34443,196 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1SupervisedHyperParameters": { + "description": "Hyperparameters for SFT.", + "id": "GoogleCloudAiplatformV1SupervisedHyperParameters", + "properties": { + "adapterSize": { + "description": "Optional. Adapter size for tuning.", + "enum": [ + "ADAPTER_SIZE_UNSPECIFIED", + "ADAPTER_SIZE_ONE", + "ADAPTER_SIZE_FOUR", + "ADAPTER_SIZE_EIGHT", + "ADAPTER_SIZE_SIXTEEN" + ], + "enumDescriptions": [ + "Adapter size is unspecified.", + "Adapter size 1.", + "Adapter size 4.", + "Adapter size 8.", + "Adapter size 16." + ], + "type": "string" + }, + "epochCount": { + "description": "Optional. Number of training epoches for this tuning job.", + "format": "int64", + "type": "string" + }, + "learningRateMultiplier": { + "description": "Optional. Learning rate multiplier for tuning.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SupervisedTuningDataStats": { + "description": "Tuning data statistics for Supervised Tuning.", + "id": "GoogleCloudAiplatformV1SupervisedTuningDataStats", + "properties": { + "totalBillableCharacterCount": { + "description": "Output only. Number of billable characters in the tuning dataset.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "totalTuningCharacterCount": { + "description": "Output only. Number of tuning characters in the tuning dataset.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "tuningDatasetExampleCount": { + "description": "Output only. Number of examples in the tuning dataset.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "tuningStepCount": { + "description": "Output only. Number of tuning steps for this Tuning Job.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "userDatasetExamples": { + "description": "Output only. Sample user messages in the training dataset uri.", + "items": { + "$ref": "GoogleCloudAiplatformV1Content" + }, + "readOnly": true, + "type": "array" + }, + "userInputTokenDistribution": { + "$ref": "GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution", + "description": "Output only. Dataset distributions for the user input tokens.", + "readOnly": true + }, + "userMessagePerExampleDistribution": { + "$ref": "GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution", + "description": "Output only. Dataset distributions for the messages per example.", + "readOnly": true + }, + "userOutputTokenDistribution": { + "$ref": "GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution", + "description": "Output only. Dataset distributions for the user output tokens.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution": { + "description": "Dataset distribution for Supervised Tuning.", + "id": "GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution", + "properties": { + "buckets": { + "description": "Output only. Defines the histogram bucket.", + "items": { + "$ref": "GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket" + }, + "readOnly": true, + "type": "array" + }, + "max": { + "description": "Output only. The maximum of the population values.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "mean": { + "description": "Output only. The arithmetic mean of the values in the population.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "median": { + "description": "Output only. The median of the values in the population.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "min": { + "description": "Output only. The minimum of the population values.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "p5": { + "description": "Output only. The 5th percentile of the values in the population.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "p95": { + "description": "Output only. The 95th percentile of the values in the population.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "sum": { + "description": "Output only. Sum of a given population of values.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket": { + "description": "Dataset bucket used to create a histogram for the distribution given a population of values.", + "id": "GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket", + "properties": { + "count": { + "description": "Output only. Number of values in the bucket.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "left": { + "description": "Output only. Left bound of the bucket.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "right": { + "description": "Output only. Right bound of the bucket.", + "format": "double", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SupervisedTuningSpec": { + "description": "Tuning Spec for Supervised Tuning.", + "id": "GoogleCloudAiplatformV1SupervisedTuningSpec", + "properties": { + "hyperParameters": { + "$ref": "GoogleCloudAiplatformV1SupervisedHyperParameters", + "description": "Optional. Hyperparameters for SFT." + }, + "trainingDatasetUri": { + "description": "Required. Cloud Storage path to file containing training dataset for tuning.", + "type": "string" + }, + "validationDatasetUri": { + "description": "Optional. Cloud Storage path to file containing validation dataset for tuning.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1SyncFeatureViewRequest": { "description": "Request message for FeatureOnlineStoreAdminService.SyncFeatureView.", "id": "GoogleCloudAiplatformV1SyncFeatureViewRequest", @@ -35132,6 +35489,146 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1TunedModel": { + "description": "The Model Registry Model and Online Prediction Endpoint assiociated with this TuningJob.", + "id": "GoogleCloudAiplatformV1TunedModel", + "properties": { + "endpoint": { + "description": "Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.", + "readOnly": true, + "type": "string" + }, + "model": { + "description": "Output only. The resource name of the TunedModel. Format: `projects/{project}/locations/{location}/models/{model}`.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TuningDataStats": { + "description": "The tuning data statistic values for TuningJob.", + "id": "GoogleCloudAiplatformV1TuningDataStats", + "properties": { + "supervisedTuningDataStats": { + "$ref": "GoogleCloudAiplatformV1SupervisedTuningDataStats", + "description": "The SFT Tuning data stats." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TuningJob": { + "description": "Represents a TuningJob that runs with Google owned models.", + "id": "GoogleCloudAiplatformV1TuningJob", + "properties": { + "baseModel": { + "description": "Model name for tuning, e.g., \"gemini-1.0-pro-002\".", + "type": "string" + }, + "createTime": { + "description": "Output only. Time when the TuningJob was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. The description of the TuningJob.", + "type": "string" + }, + "endTime": { + "description": "Output only. Time when the TuningJob entered any of the following JobStates: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Output only. Only populated when job's state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.", + "readOnly": true + }, + "experiment": { + "description": "Output only. The Experiment associated with this TuningJob.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.", + "type": "object" + }, + "name": { + "description": "Output only. Identifier. Resource name of a TuningJob. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. Time when the TuningJob for the first time entered the `JOB_STATE_RUNNING` state.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The detailed state of the job.", + "enum": [ + "JOB_STATE_UNSPECIFIED", + "JOB_STATE_QUEUED", + "JOB_STATE_PENDING", + "JOB_STATE_RUNNING", + "JOB_STATE_SUCCEEDED", + "JOB_STATE_FAILED", + "JOB_STATE_CANCELLING", + "JOB_STATE_CANCELLED", + "JOB_STATE_PAUSED", + "JOB_STATE_EXPIRED", + "JOB_STATE_UPDATING", + "JOB_STATE_PARTIALLY_SUCCEEDED" + ], + "enumDescriptions": [ + "The job state is unspecified.", + "The job has been just created or resumed and processing has not yet begun.", + "The service is preparing to run the job.", + "The job is in progress.", + "The job completed successfully.", + "The job failed.", + "The job is being cancelled. From this state the job may only go to either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.", + "The job has been cancelled.", + "The job has been stopped, and can be resumed.", + "The job has expired.", + "The job is being updated. Only jobs in the `RUNNING` state can be updated. After updating, the job goes back to the `RUNNING` state.", + "The job is partially succeeded, some results may be missing due to errors." + ], + "readOnly": true, + "type": "string" + }, + "supervisedTuningSpec": { + "$ref": "GoogleCloudAiplatformV1SupervisedTuningSpec", + "description": "Tuning Spec for Supervised Fine Tuning." + }, + "tunedModel": { + "$ref": "GoogleCloudAiplatformV1TunedModel", + "description": "Output only. The tuned model resources assiociated with this TuningJob.", + "readOnly": true + }, + "tunedModelDisplayName": { + "description": "Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters.", + "type": "string" + }, + "tuningDataStats": { + "$ref": "GoogleCloudAiplatformV1TuningDataStats", + "description": "Output only. The tuning data statistics associated with this TuningJob.", + "readOnly": true + }, + "updateTime": { + "description": "Output only. Time when the TuningJob was most recently updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1UndeployIndexOperationMetadata": { "description": "Runtime operation information for IndexEndpointService.UndeployIndex.", "id": "GoogleCloudAiplatformV1UndeployIndexOperationMetadata", @@ -36434,7 +36931,13 @@ "CLOUD_GEMIT_AMPS", "CLOUD_GEMIT_AQUA", "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA", - "CLOUD_GEMIT_GSM8K_SCHEMA" + "CLOUD_GEMIT_GSM8K_SCHEMA", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR", + "GEMINI_V1_TAIL_PATCH_GOALDMINE", + "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" ], "enumDescriptions": [ "", @@ -36761,6 +37264,12 @@ "", "", "", + "", + "Gemini V1 tail patch translation.", + "", + "", + "", + "Gemini V1 tail patch others.", "" ], "type": "string" @@ -37202,7 +37711,13 @@ "CLOUD_GEMIT_AMPS", "CLOUD_GEMIT_AQUA", "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA", - "CLOUD_GEMIT_GSM8K_SCHEMA" + "CLOUD_GEMIT_GSM8K_SCHEMA", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR", + "GEMINI_V1_TAIL_PATCH_GOALDMINE", + "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" ], "enumDescriptions": [ "", @@ -37529,6 +38044,12 @@ "", "", "", + "", + "Gemini V1 tail patch translation.", + "", + "", + "", + "Gemini V1 tail patch others.", "" ], "type": "string" @@ -37981,7 +38502,13 @@ "CLOUD_GEMIT_AMPS", "CLOUD_GEMIT_AQUA", "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA", - "CLOUD_GEMIT_GSM8K_SCHEMA" + "CLOUD_GEMIT_GSM8K_SCHEMA", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR", + "GEMINI_V1_TAIL_PATCH_GOALDMINE", + "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" ], "enumDescriptions": [ "", @@ -38101,7 +38628,7 @@ "", "", "", - "Github Github dataset with license info. We prefer this to help cite proper licenses for code recitation.", + "GitHub dataset with license info. We prefer this to help cite proper licenses for code recitation.", "", "", "", @@ -38308,6 +38835,12 @@ "", "", "", + "", + "Gemini V1 tail patch translation.", + "", + "", + "", + "Gemini V1 tail patch others.", "" ], "type": "string" @@ -38749,7 +39282,13 @@ "CLOUD_GEMIT_AMPS", "CLOUD_GEMIT_AQUA", "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA", - "CLOUD_GEMIT_GSM8K_SCHEMA" + "CLOUD_GEMIT_GSM8K_SCHEMA", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR", + "GEMINI_V1_TAIL_PATCH_GOALDMINE", + "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" ], "enumDescriptions": [ "", @@ -38869,7 +39408,7 @@ "", "", "", - "Github Github dataset with license info. We prefer this to help cite proper licenses for code recitation.", + "GitHub dataset with license info. We prefer this to help cite proper licenses for code recitation.", "", "", "", @@ -39076,6 +39615,12 @@ "", "", "", + "", + "Gemini V1 tail patch translation.", + "", + "", + "", + "Gemini V1 tail patch others.", "" ], "type": "string" @@ -39920,6 +40465,25 @@ }, "type": "object" }, + "LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata": { + "id": "LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata", + "properties": { + "factRetrievalMillisecondsByProvider": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "Latency spent on fact retrievals. There might be multiple retrievals from different fact providers.", + "type": "object" + }, + "prompt2queryMilliseconds": { + "description": "Latency spent on prompt2query. The procedure generates a search-friendly query given the original prompt.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "LearningGenaiRootRAIOutput": { "description": "This is per harm.", "id": "LearningGenaiRootRAIOutput", @@ -40381,6 +40945,25 @@ }, "type": "object" }, + "LearningGenaiRootTranslationRequestInfo": { + "description": "Each TranslationRequestInfo corresponds to a request sent to the translation server.", + "id": "LearningGenaiRootTranslationRequestInfo", + "properties": { + "detectedLanguageCodes": { + "description": "The ISO-639 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.", + "items": { + "type": "string" + }, + "type": "array" + }, + "totalContentSize": { + "description": "The sum of the size of all the contents in the request.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "LearningServingLlmMessageMetadata": { "description": "LINT.IfChange This metadata contains additional information required for debugging.", "id": "LearningServingLlmMessageMetadata", diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index 11477579ca0..48361b1f495 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -2209,6 +2209,9 @@ func (s *CloudAiNlLlmProtoServiceGenerateMultiModalResponse) MarshalJSON() ([]by } type CloudAiNlLlmProtoServiceMessageMetadata struct { + // FactualityDebugMetadata: Factuality-related debug metadata. + FactualityDebugMetadata *LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata `json:"factualityDebugMetadata,omitempty"` + // InputFilterInfo: Filter metadata of the input messages. InputFilterInfo *LearningServingLlmMessageMetadata `json:"inputFilterInfo,omitempty"` @@ -2219,18 +2222,19 @@ type CloudAiNlLlmProtoServiceMessageMetadata struct { // OutputFilterInfo: Filter metadata of the output messages. OutputFilterInfo []*LearningServingLlmMessageMetadata `json:"outputFilterInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "InputFilterInfo") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "FactualityDebugMetadata") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InputFilterInfo") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "FactualityDebugMetadata") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. @@ -2530,6 +2534,11 @@ type CloudAiNlLlmProtoServiceRaiResult struct { // RaiSignals: The RAI signals for the text. RaiSignals []*CloudAiNlLlmProtoServiceRaiSignal `json:"raiSignals,omitempty"` + // TranslationRequestInfos: Translation request info during RAI for + // debugging purpose. Each TranslationRequestInfo corresponds to a + // request sent to the translation server. + TranslationRequestInfos []*LearningGenaiRootTranslationRequestInfo `json:"translationRequestInfos,omitempty"` + // TriggeredBlocklist: Whether the text triggered the blocklist. TriggeredBlocklist bool `json:"triggeredBlocklist,omitempty"` @@ -5154,6 +5163,11 @@ type GoogleCloudAiplatformV1CancelPipelineJobRequest struct { type GoogleCloudAiplatformV1CancelTrainingPipelineRequest struct { } +// GoogleCloudAiplatformV1CancelTuningJobRequest: Request message for +// GenAiTuningService.CancelTuningJob. +type GoogleCloudAiplatformV1CancelTuningJobRequest struct { +} + // GoogleCloudAiplatformV1Candidate: A response candidate generated from // the model. type GoogleCloudAiplatformV1Candidate struct { @@ -12919,8 +12933,8 @@ func (s *GoogleCloudAiplatformV1FilterSplit) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1FindNeighborsRequest: LINT.IfChange The -// request message for MatchService.FindNeighbors. +// GoogleCloudAiplatformV1FindNeighborsRequest: The request message for +// MatchService.FindNeighbors. type GoogleCloudAiplatformV1FindNeighborsRequest struct { // DeployedIndexId: The ID of the DeployedIndex that will serve the // request. This request is sent to a specific IndexEndpoint, as per the @@ -13590,6 +13604,13 @@ type GoogleCloudAiplatformV1GenerationConfig struct { // PresencePenalty: Optional. Positive penalties. PresencePenalty float64 `json:"presencePenalty,omitempty"` + // ResponseMimeType: Optional. Output response mimetype of the generated + // candidate text. Supported mimetype: `text/plain`: (default) Text + // output. `application/json`: JSON response in the candidates. The + // model needs to be prompted to output the appropriate response type, + // otherwise the behavior is undefined. This is a preview feature. + ResponseMimeType string `json:"responseMimeType,omitempty"` + // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` @@ -13838,9 +13859,6 @@ type GoogleCloudAiplatformV1GroundingMetadata struct { // GroundingAttributions: Optional. List of grounding attributions. GroundingAttributions []*GoogleCloudAiplatformV1GroundingAttribution `json:"groundingAttributions,omitempty"` - // RetrievalQueries: Optional. Queries executed by the retrieval tools. - RetrievalQueries []string `json:"retrievalQueries,omitempty"` - // WebSearchQueries: Optional. Web search queries for the following-up // web search. WebSearchQueries []string `json:"webSearchQueries,omitempty"` @@ -16904,6 +16922,43 @@ func (s *GoogleCloudAiplatformV1ListTrialsResponse) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1ListTuningJobsResponse: Response message for +// GenAiTuningService.ListTuningJobs +type GoogleCloudAiplatformV1ListTuningJobsResponse struct { + // NextPageToken: A token to retrieve the next page of results. Pass to + // ListTuningJobsRequest.page_token to obtain that page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // TuningJobs: List of TuningJobs in the requested page. + TuningJobs []*GoogleCloudAiplatformV1TuningJob `json:"tuningJobs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ListTuningJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ListTuningJobsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1LookupStudyRequest: Request message for // VizierService.LookupStudy. type GoogleCloudAiplatformV1LookupStudyRequest struct { @@ -20698,6 +20753,8 @@ type GoogleCloudAiplatformV1NearestNeighborSearchOperationMetadataRecordError st // "INVALID_NUMERIC_VALUE" - Numeric restrict has invalid numeric // value specified. // "INVALID_ENCODING" - File is not in UTF_8 format. + // "INVALID_SPARSE_DIMENSIONS" - Error parsing sparse dimensions + // field. ErrorType string `json:"errorType,omitempty"` // RawRecord: The original content of this record. @@ -22831,10 +22888,6 @@ type GoogleCloudAiplatformV1PublisherModelCallToAction struct { // Engine. DeployGke *GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke `json:"deployGke,omitempty"` - // MultiDeployVertex: Optional. Multiple setups to deploy the - // PublisherModel to Vertex Endpoint. - MultiDeployVertex *GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex `json:"multiDeployVertex,omitempty"` - // OpenEvaluationPipeline: Optional. Open evaluation pipeline of the // PublisherModel. OpenEvaluationPipeline *GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences `json:"openEvaluationPipeline,omitempty"` @@ -22990,36 +23043,6 @@ func (s *GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke) MarshalJSON return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex: -// Multiple setups to deploy the PublisherModel. -type GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex struct { - // MultiDeployVertex: Optional. One click deployment configurations. - MultiDeployVertex []*GoogleCloudAiplatformV1PublisherModelCallToActionDeploy `json:"multiDeployVertex,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MultiDeployVertex") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MultiDeployVertex") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelin // es: Open fine tuning pipelines. type GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines struct { @@ -23669,89 +23692,11 @@ func (s *GoogleCloudAiplatformV1RawPredictRequest) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1RayMetricSpec: Configuration for the Ray -// metrics. -type GoogleCloudAiplatformV1RayMetricSpec struct { - // Disabled: Optional. Flag to disable the Ray metrics collection. - Disabled bool `json:"disabled,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disabled") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1RayMetricSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1RayMetricSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1RaySpec: Configuration information for the Ray // cluster. For experimental launch, Ray cluster creation and Persistent // cluster creation are 1:1 mapping: We will provision all the nodes // within the Persistent cluster as Ray nodes. type GoogleCloudAiplatformV1RaySpec struct { - // HeadNodeResourcePoolId: Optional. This will be used to indicate which - // resource pool will serve as the Ray head node(the first node within - // that pool). Will use the machine from the first workerpool as the - // head node by default if this field isn't set. - HeadNodeResourcePoolId string `json:"headNodeResourcePoolId,omitempty"` - - // ImageUri: Optional. Default image for user to choose a preferred ML - // framework (for example, TensorFlow or Pytorch) by choosing from - // Vertex prebuilt images - // (https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). - // Either this or the resource_pool_images is required. Use this field - // if you need all the resource pools to have the same Ray image. - // Otherwise, use the {@code resource_pool_images} field. - ImageUri string `json:"imageUri,omitempty"` - - // RayMetricSpec: Optional. Ray metrics configurations. - RayMetricSpec *GoogleCloudAiplatformV1RayMetricSpec `json:"rayMetricSpec,omitempty"` - - // ResourcePoolImages: Optional. Required if image_uri isn't set. A map - // of resource_pool_id to prebuild Ray image if user need to use - // different images for different head/worker pools. This map needs to - // cover all the resource pool ids. Example: { "ray_head_node_pool": - // "head image" "ray_worker_node_pool1": "worker image" - // "ray_worker_node_pool2": "another worker image" } - ResourcePoolImages map[string]string `json:"resourcePoolImages,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "HeadNodeResourcePoolId") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "HeadNodeResourcePoolId") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1RaySpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1RaySpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // GoogleCloudAiplatformV1ReadFeatureValuesRequest: Request message for @@ -24434,39 +24379,6 @@ func (s *GoogleCloudAiplatformV1ResourcePoolAutoscalingSpec) MarshalJSON() ([]by // GoogleCloudAiplatformV1ResourceRuntime: Persistent Cluster runtime // information as output type GoogleCloudAiplatformV1ResourceRuntime struct { - // AccessUris: Output only. URIs for user to connect to the Cluster. - // Example: { "RAY_HEAD_NODE_INTERNAL_IP": "head-node-IP:10001" - // "RAY_DASHBOARD_URI": "ray-dashboard-address:8888" } - AccessUris map[string]string `json:"accessUris,omitempty"` - - // NotebookRuntimeTemplate: Output only. The resource name of - // NotebookRuntimeTemplate for the RoV Persistent Cluster The - // NotebokRuntimeTemplate is created in the same VPC (if set), and with - // the same Ray and Python version as the Persistent Cluster. Example: - // "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123" - NotebookRuntimeTemplate string `json:"notebookRuntimeTemplate,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AccessUris") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AccessUris") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1ResourceRuntime) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1ResourceRuntime - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // GoogleCloudAiplatformV1ResourceRuntimeSpec: Configuration for the @@ -26509,6 +26421,118 @@ func (s *GoogleCloudAiplatformV1SchemaModelevaluationMetricsImageSegmentationEva return nil } +// GoogleCloudAiplatformV1SchemaModelevaluationMetricsPairwiseTextGenerat +// ionEvaluationMetrics: Metrics for general pairwise text generation +// evaluation results. +type GoogleCloudAiplatformV1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics struct { + // Accuracy: Fraction of cases where the autorater agreed with the human + // raters. + Accuracy float64 `json:"accuracy,omitempty"` + + // BaselineModelWinRate: Percentage of time the autorater decided the + // baseline model had the better response. + BaselineModelWinRate float64 `json:"baselineModelWinRate,omitempty"` + + // CohensKappa: A measurement of agreement between the autorater and + // human raters that takes the likelihood of random agreement into + // account. + CohensKappa float64 `json:"cohensKappa,omitempty"` + + // F1Score: Harmonic mean of precision and recall. + F1Score float64 `json:"f1Score,omitempty"` + + // FalseNegativeCount: Number of examples where the autorater chose the + // baseline model, but humans preferred the model. + FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"` + + // FalsePositiveCount: Number of examples where the autorater chose the + // model, but humans preferred the baseline model. + FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"` + + // HumanPreferenceBaselineModelWinRate: Percentage of time humans + // decided the baseline model had the better response. + HumanPreferenceBaselineModelWinRate float64 `json:"humanPreferenceBaselineModelWinRate,omitempty"` + + // HumanPreferenceModelWinRate: Percentage of time humans decided the + // model had the better response. + HumanPreferenceModelWinRate float64 `json:"humanPreferenceModelWinRate,omitempty"` + + // ModelWinRate: Percentage of time the autorater decided the model had + // the better response. + ModelWinRate float64 `json:"modelWinRate,omitempty"` + + // Precision: Fraction of cases where the autorater and humans thought + // the model had a better response out of all cases where the autorater + // thought the model had a better response. True positive divided by all + // positive. + Precision float64 `json:"precision,omitempty"` + + // Recall: Fraction of cases where the autorater and humans thought the + // model had a better response out of all cases where the humans thought + // the model had a better response. + Recall float64 `json:"recall,omitempty"` + + // TrueNegativeCount: Number of examples where both the autorater and + // humans decided that the model had the worse response. + TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"` + + // TruePositiveCount: Number of examples where both the autorater and + // humans decided that the model had the better response. + TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Accuracy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Accuracy") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics + var s1 struct { + Accuracy gensupport.JSONFloat64 `json:"accuracy"` + BaselineModelWinRate gensupport.JSONFloat64 `json:"baselineModelWinRate"` + CohensKappa gensupport.JSONFloat64 `json:"cohensKappa"` + F1Score gensupport.JSONFloat64 `json:"f1Score"` + HumanPreferenceBaselineModelWinRate gensupport.JSONFloat64 `json:"humanPreferenceBaselineModelWinRate"` + HumanPreferenceModelWinRate gensupport.JSONFloat64 `json:"humanPreferenceModelWinRate"` + ModelWinRate gensupport.JSONFloat64 `json:"modelWinRate"` + Precision gensupport.JSONFloat64 `json:"precision"` + Recall gensupport.JSONFloat64 `json:"recall"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Accuracy = float64(s1.Accuracy) + s.BaselineModelWinRate = float64(s1.BaselineModelWinRate) + s.CohensKappa = float64(s1.CohensKappa) + s.F1Score = float64(s1.F1Score) + s.HumanPreferenceBaselineModelWinRate = float64(s1.HumanPreferenceBaselineModelWinRate) + s.HumanPreferenceModelWinRate = float64(s1.HumanPreferenceModelWinRate) + s.ModelWinRate = float64(s1.ModelWinRate) + s.Precision = float64(s1.Precision) + s.Recall = float64(s1.Recall) + return nil +} + type GoogleCloudAiplatformV1SchemaModelevaluationMetricsQuestionAnsweringEvaluationMetrics struct { // ExactMatch: The rate at which the input predicted strings exactly // match their references. @@ -33517,14 +33541,14 @@ type GoogleCloudAiplatformV1ServiceAccountSpec struct { // (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). EnableCustomServiceAccount bool `json:"enableCustomServiceAccount,omitempty"` - // ServiceAccount: Optional. Default service account that this - // PersistentResource's workloads run as. The workloads include: * Any - // runtime specified via `ResourceRuntimeSpec` on creation time, for - // example, Ray. * Jobs submitted to PersistentResource, if no other - // service account specified in the job specs. Only works when custom - // service account is enabled and users have the - // `iam.serviceAccounts.actAs` permission on this service account. - // Required if any containers are specified in `ResourceRuntimeSpec`. + // ServiceAccount: Optional. Required when all below conditions are met + // * `enable_custom_service_account` is true; * any runtime is specified + // via `ResourceRuntimeSpec` on creation time, for example, Ray The + // users must have `iam.serviceAccounts.actAs` permission on this + // service account and then the specified runtime containers will run as + // it. Do not set this field if you want to submit jobs using custom + // service account to this PersistentResource after creation, but only + // specify the `service_account` inside the job. ServiceAccount string `json:"serviceAccount,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -35080,6 +35104,291 @@ func (s *GoogleCloudAiplatformV1SuggestTrialsResponse) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1SupervisedHyperParameters: Hyperparameters for +// SFT. +type GoogleCloudAiplatformV1SupervisedHyperParameters struct { + // AdapterSize: Optional. Adapter size for tuning. + // + // Possible values: + // "ADAPTER_SIZE_UNSPECIFIED" - Adapter size is unspecified. + // "ADAPTER_SIZE_ONE" - Adapter size 1. + // "ADAPTER_SIZE_FOUR" - Adapter size 4. + // "ADAPTER_SIZE_EIGHT" - Adapter size 8. + // "ADAPTER_SIZE_SIXTEEN" - Adapter size 16. + AdapterSize string `json:"adapterSize,omitempty"` + + // EpochCount: Optional. Number of training epoches for this tuning job. + EpochCount int64 `json:"epochCount,omitempty,string"` + + // LearningRateMultiplier: Optional. Learning rate multiplier for + // tuning. + LearningRateMultiplier float64 `json:"learningRateMultiplier,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdapterSize") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdapterSize") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SupervisedHyperParameters) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SupervisedHyperParameters + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1SupervisedHyperParameters) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1SupervisedHyperParameters + var s1 struct { + LearningRateMultiplier gensupport.JSONFloat64 `json:"learningRateMultiplier"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.LearningRateMultiplier = float64(s1.LearningRateMultiplier) + return nil +} + +// GoogleCloudAiplatformV1SupervisedTuningDataStats: Tuning data +// statistics for Supervised Tuning. +type GoogleCloudAiplatformV1SupervisedTuningDataStats struct { + // TotalBillableCharacterCount: Output only. Number of billable + // characters in the tuning dataset. + TotalBillableCharacterCount int64 `json:"totalBillableCharacterCount,omitempty,string"` + + // TotalTuningCharacterCount: Output only. Number of tuning characters + // in the tuning dataset. + TotalTuningCharacterCount int64 `json:"totalTuningCharacterCount,omitempty,string"` + + // TuningDatasetExampleCount: Output only. Number of examples in the + // tuning dataset. + TuningDatasetExampleCount int64 `json:"tuningDatasetExampleCount,omitempty,string"` + + // TuningStepCount: Output only. Number of tuning steps for this Tuning + // Job. + TuningStepCount int64 `json:"tuningStepCount,omitempty,string"` + + // UserDatasetExamples: Output only. Sample user messages in the + // training dataset uri. + UserDatasetExamples []*GoogleCloudAiplatformV1Content `json:"userDatasetExamples,omitempty"` + + // UserInputTokenDistribution: Output only. Dataset distributions for + // the user input tokens. + UserInputTokenDistribution *GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution `json:"userInputTokenDistribution,omitempty"` + + // UserMessagePerExampleDistribution: Output only. Dataset distributions + // for the messages per example. + UserMessagePerExampleDistribution *GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution `json:"userMessagePerExampleDistribution,omitempty"` + + // UserOutputTokenDistribution: Output only. Dataset distributions for + // the user output tokens. + UserOutputTokenDistribution *GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution `json:"userOutputTokenDistribution,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "TotalBillableCharacterCount") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "TotalBillableCharacterCount") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SupervisedTuningDataStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SupervisedTuningDataStats + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution: Dataset +// distribution for Supervised Tuning. +type GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution struct { + // Buckets: Output only. Defines the histogram bucket. + Buckets []*GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket `json:"buckets,omitempty"` + + // Max: Output only. The maximum of the population values. + Max float64 `json:"max,omitempty"` + + // Mean: Output only. The arithmetic mean of the values in the + // population. + Mean float64 `json:"mean,omitempty"` + + // Median: Output only. The median of the values in the population. + Median float64 `json:"median,omitempty"` + + // Min: Output only. The minimum of the population values. + Min float64 `json:"min,omitempty"` + + // P5: Output only. The 5th percentile of the values in the population. + P5 float64 `json:"p5,omitempty"` + + // P95: Output only. The 95th percentile of the values in the + // population. + P95 float64 `json:"p95,omitempty"` + + // Sum: Output only. Sum of a given population of values. + Sum int64 `json:"sum,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Buckets") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Buckets") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution + var s1 struct { + Max gensupport.JSONFloat64 `json:"max"` + Mean gensupport.JSONFloat64 `json:"mean"` + Median gensupport.JSONFloat64 `json:"median"` + Min gensupport.JSONFloat64 `json:"min"` + P5 gensupport.JSONFloat64 `json:"p5"` + P95 gensupport.JSONFloat64 `json:"p95"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Max = float64(s1.Max) + s.Mean = float64(s1.Mean) + s.Median = float64(s1.Median) + s.Min = float64(s1.Min) + s.P5 = float64(s1.P5) + s.P95 = float64(s1.P95) + return nil +} + +// GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucke +// t: Dataset bucket used to create a histogram for the distribution +// given a population of values. +type GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket struct { + // Count: Output only. Number of values in the bucket. + Count float64 `json:"count,omitempty"` + + // Left: Output only. Left bound of the bucket. + Left float64 `json:"left,omitempty"` + + // Right: Output only. Right bound of the bucket. + Right float64 `json:"right,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Count") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket + var s1 struct { + Count gensupport.JSONFloat64 `json:"count"` + Left gensupport.JSONFloat64 `json:"left"` + Right gensupport.JSONFloat64 `json:"right"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Count = float64(s1.Count) + s.Left = float64(s1.Left) + s.Right = float64(s1.Right) + return nil +} + +// GoogleCloudAiplatformV1SupervisedTuningSpec: Tuning Spec for +// Supervised Tuning. +type GoogleCloudAiplatformV1SupervisedTuningSpec struct { + // HyperParameters: Optional. Hyperparameters for SFT. + HyperParameters *GoogleCloudAiplatformV1SupervisedHyperParameters `json:"hyperParameters,omitempty"` + + // TrainingDatasetUri: Required. Cloud Storage path to file containing + // training dataset for tuning. + TrainingDatasetUri string `json:"trainingDatasetUri,omitempty"` + + // ValidationDatasetUri: Optional. Cloud Storage path to file containing + // validation dataset for tuning. + ValidationDatasetUri string `json:"validationDatasetUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HyperParameters") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HyperParameters") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SupervisedTuningSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SupervisedTuningSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1SyncFeatureViewRequest: Request message for // FeatureOnlineStoreAdminService.SyncFeatureView. type GoogleCloudAiplatformV1SyncFeatureViewRequest struct { @@ -36369,6 +36678,182 @@ func (s *GoogleCloudAiplatformV1TrialParameter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1TunedModel: The Model Registry Model and +// Online Prediction Endpoint assiociated with this TuningJob. +type GoogleCloudAiplatformV1TunedModel struct { + // Endpoint: Output only. A resource name of an Endpoint. Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}`. + Endpoint string `json:"endpoint,omitempty"` + + // Model: Output only. The resource name of the TunedModel. Format: + // `projects/{project}/locations/{location}/models/{model}`. + Model string `json:"model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Endpoint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Endpoint") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1TunedModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TunedModel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1TuningDataStats: The tuning data statistic +// values for TuningJob. +type GoogleCloudAiplatformV1TuningDataStats struct { + // SupervisedTuningDataStats: The SFT Tuning data stats. + SupervisedTuningDataStats *GoogleCloudAiplatformV1SupervisedTuningDataStats `json:"supervisedTuningDataStats,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "SupervisedTuningDataStats") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "SupervisedTuningDataStats") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1TuningDataStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TuningDataStats + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1TuningJob: Represents a TuningJob that runs +// with Google owned models. +type GoogleCloudAiplatformV1TuningJob struct { + // BaseModel: Model name for tuning, e.g., "gemini-1.0-pro-002". + BaseModel string `json:"baseModel,omitempty"` + + // CreateTime: Output only. Time when the TuningJob was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. The description of the TuningJob. + Description string `json:"description,omitempty"` + + // EndTime: Output only. Time when the TuningJob entered any of the + // following JobStates: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, + // `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`. + EndTime string `json:"endTime,omitempty"` + + // Error: Output only. Only populated when job's state is + // `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // Experiment: Output only. The Experiment associated with this + // TuningJob. + Experiment string `json:"experiment,omitempty"` + + // Labels: Optional. The labels with user-defined metadata to organize + // TuningJob and generated resources such as Model and Endpoint. Label + // keys and values can be no longer than 64 characters (Unicode + // codepoints), can only contain lowercase letters, numeric characters, + // underscores and dashes. International characters are allowed. See + // https://goo.gl/xmQnxf for more information and examples of labels. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. Identifier. Resource name of a TuningJob. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + Name string `json:"name,omitempty"` + + // StartTime: Output only. Time when the TuningJob for the first time + // entered the `JOB_STATE_RUNNING` state. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The detailed state of the job. + // + // Possible values: + // "JOB_STATE_UNSPECIFIED" - The job state is unspecified. + // "JOB_STATE_QUEUED" - The job has been just created or resumed and + // processing has not yet begun. + // "JOB_STATE_PENDING" - The service is preparing to run the job. + // "JOB_STATE_RUNNING" - The job is in progress. + // "JOB_STATE_SUCCEEDED" - The job completed successfully. + // "JOB_STATE_FAILED" - The job failed. + // "JOB_STATE_CANCELLING" - The job is being cancelled. From this + // state the job may only go to either `JOB_STATE_SUCCEEDED`, + // `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`. + // "JOB_STATE_CANCELLED" - The job has been cancelled. + // "JOB_STATE_PAUSED" - The job has been stopped, and can be resumed. + // "JOB_STATE_EXPIRED" - The job has expired. + // "JOB_STATE_UPDATING" - The job is being updated. Only jobs in the + // `RUNNING` state can be updated. After updating, the job goes back to + // the `RUNNING` state. + // "JOB_STATE_PARTIALLY_SUCCEEDED" - The job is partially succeeded, + // some results may be missing due to errors. + State string `json:"state,omitempty"` + + // SupervisedTuningSpec: Tuning Spec for Supervised Fine Tuning. + SupervisedTuningSpec *GoogleCloudAiplatformV1SupervisedTuningSpec `json:"supervisedTuningSpec,omitempty"` + + // TunedModel: Output only. The tuned model resources assiociated with + // this TuningJob. + TunedModel *GoogleCloudAiplatformV1TunedModel `json:"tunedModel,omitempty"` + + // TunedModelDisplayName: Optional. The display name of the TunedModel. + // The name can be up to 128 characters long and can consist of any + // UTF-8 characters. + TunedModelDisplayName string `json:"tunedModelDisplayName,omitempty"` + + // TuningDataStats: Output only. The tuning data statistics associated + // with this TuningJob. + TuningDataStats *GoogleCloudAiplatformV1TuningDataStats `json:"tuningDataStats,omitempty"` + + // UpdateTime: Output only. Time when the TuningJob was most recently + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "BaseModel") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BaseModel") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1TuningJob) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TuningJob + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1UndeployIndexOperationMetadata: Runtime // operation information for IndexEndpointService.UndeployIndex. type GoogleCloudAiplatformV1UndeployIndexOperationMetadata struct { @@ -39006,6 +39491,13 @@ type LanguageLabsAidaTrustRecitationProtoDocAttribution struct { // "CLOUD_GEMIT_AQUA" // "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA" // "CLOUD_GEMIT_GSM8K_SCHEMA" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN" - Gemini V1 tail patch + // translation. + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR" + // "GEMINI_V1_TAIL_PATCH_GOALDMINE" - Gemini V1 tail patch others. + // "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" Dataset string `json:"dataset,omitempty"` Filepath string `json:"filepath,omitempty"` @@ -39595,6 +40087,13 @@ type LanguageLabsAidaTrustRecitationProtoSegmentResult struct { // "CLOUD_GEMIT_AQUA" // "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA" // "CLOUD_GEMIT_GSM8K_SCHEMA" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN" - Gemini V1 tail patch + // translation. + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR" + // "GEMINI_V1_TAIL_PATCH_GOALDMINE" - Gemini V1 tail patch others. + // "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" AttributionDataset string `json:"attributionDataset,omitempty"` // DisplayAttributionMessage: human-friendly string that contains @@ -39875,9 +40374,8 @@ type LearningGenaiRecitationDocAttribution struct { // "GEMINI_V1_DOCJOIN_100B_EN_TOXICITY_TAGGED_GCC_FIXED_TAGS" // "GEMINI_V1_PUBMED" // "GEMINI_V1_WEB_MATH_V2" - // "GEMINI_V1_CMS_GITHUB_V7" - Github Github dataset with license - // info. We prefer this to help cite proper licenses for code - // recitation. + // "GEMINI_V1_CMS_GITHUB_V7" - GitHub dataset with license info. We + // prefer this to help cite proper licenses for code recitation. // "GEMINI_V1_CMS_GITHUB_DECONTAMINATED_V_7" // "GEMINI_V1_GITHUB_DIFF_WITH_COMMIT_MESSAGE_V2" // "GEMINI_V1_GITHUB_HTML_CSS_XML_V4" @@ -40179,6 +40677,13 @@ type LearningGenaiRecitationDocAttribution struct { // "CLOUD_GEMIT_AQUA" // "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA" // "CLOUD_GEMIT_GSM8K_SCHEMA" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN" - Gemini V1 tail patch + // translation. + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR" + // "GEMINI_V1_TAIL_PATCH_GOALDMINE" - Gemini V1 tail patch others. + // "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" Dataset string `json:"dataset,omitempty"` Filepath string `json:"filepath,omitempty"` @@ -40464,9 +40969,8 @@ type LearningGenaiRecitationSegmentResult struct { // "GEMINI_V1_DOCJOIN_100B_EN_TOXICITY_TAGGED_GCC_FIXED_TAGS" // "GEMINI_V1_PUBMED" // "GEMINI_V1_WEB_MATH_V2" - // "GEMINI_V1_CMS_GITHUB_V7" - Github Github dataset with license - // info. We prefer this to help cite proper licenses for code - // recitation. + // "GEMINI_V1_CMS_GITHUB_V7" - GitHub dataset with license info. We + // prefer this to help cite proper licenses for code recitation. // "GEMINI_V1_CMS_GITHUB_DECONTAMINATED_V_7" // "GEMINI_V1_GITHUB_DIFF_WITH_COMMIT_MESSAGE_V2" // "GEMINI_V1_GITHUB_HTML_CSS_XML_V4" @@ -40768,6 +41272,13 @@ type LearningGenaiRecitationSegmentResult struct { // "CLOUD_GEMIT_AQUA" // "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA" // "CLOUD_GEMIT_GSM8K_SCHEMA" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN" - Gemini V1 tail patch + // translation. + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR" + // "GEMINI_V1_TAIL_PATCH_GOALDMINE" - Gemini V1 tail patch others. + // "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" AttributionDataset string `json:"attributionDataset,omitempty"` // DisplayAttributionMessage: human-friendly string that contains @@ -41826,6 +42337,42 @@ func (s *LearningGenaiRootMetricOutput) UnmarshalJSON(data []byte) error { return nil } +type LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata struct { + // FactRetrievalMillisecondsByProvider: Latency spent on fact + // retrievals. There might be multiple retrievals from different fact + // providers. + FactRetrievalMillisecondsByProvider map[string]string `json:"factRetrievalMillisecondsByProvider,omitempty"` + + // Prompt2queryMilliseconds: Latency spent on prompt2query. The + // procedure generates a search-friendly query given the original + // prompt. + Prompt2queryMilliseconds int64 `json:"prompt2queryMilliseconds,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "FactRetrievalMillisecondsByProvider") to unconditionally include in + // API requests. By default, fields with empty or default values are + // omitted from API requests. However, any non-pointer, non-interface + // field appearing in ForceSendFields will be sent to the server + // regardless of whether the field is empty or not. This may be used to + // include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "FactRetrievalMillisecondsByProvider") to include in API requests + // with the JSON null value. By default, fields with empty values are + // omitted from API requests. However, any field with an empty value + // appearing in NullFields will be sent to the server as null. It is an + // error if a field in this list has a non-empty value. This may be used + // to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata) MarshalJSON() ([]byte, error) { + type NoMethod LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LearningGenaiRootRAIOutput: This is per harm. type LearningGenaiRootRAIOutput struct { Allowed bool `json:"allowed,omitempty"` @@ -42721,6 +43268,45 @@ func (s *LearningGenaiRootToxicitySignal) UnmarshalJSON(data []byte) error { return nil } +// LearningGenaiRootTranslationRequestInfo: Each TranslationRequestInfo +// corresponds to a request sent to the translation server. +type LearningGenaiRootTranslationRequestInfo struct { + // DetectedLanguageCodes: The ISO-639 language code of source text in + // the initial request, detected automatically, if no source language + // was passed within the initial request. If the source language was + // passed, auto-detection of the language does not occur and this field + // is empty. + DetectedLanguageCodes []string `json:"detectedLanguageCodes,omitempty"` + + // TotalContentSize: The sum of the size of all the contents in the + // request. + TotalContentSize int64 `json:"totalContentSize,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "DetectedLanguageCodes") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedLanguageCodes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LearningGenaiRootTranslationRequestInfo) MarshalJSON() ([]byte, error) { + type NoMethod LearningGenaiRootTranslationRequestInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LearningServingLlmMessageMetadata: LINT.IfChange This metadata // contains additional information required for debugging. type LearningServingLlmMessageMetadata struct { @@ -122678,6 +123264,656 @@ func (c *ProjectsLocationsTrainingPipelinesOperationsWaitCall) Do(opts ...google } +// method id "aiplatform.projects.locations.tuningJobs.cancel": + +type ProjectsLocationsTuningJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1canceltuningjobrequest *GoogleCloudAiplatformV1CancelTuningJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels a TuningJob. Starts asynchronous cancellation on the +// TuningJob. The server makes a best effort to cancel the job, but +// success is not guaranteed. Clients can use +// GenAiTuningService.GetTuningJob or other methods to check whether the +// cancellation succeeded or whether the job completed despite +// cancellation. On successful cancellation, the TuningJob is not +// deleted; instead it becomes a job with a TuningJob.error value with a +// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and +// TuningJob.state is set to `CANCELLED`. +// +// - name: The name of the TuningJob to cancel. Format: +// `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`. +func (r *ProjectsLocationsTuningJobsService) Cancel(name string, googlecloudaiplatformv1canceltuningjobrequest *GoogleCloudAiplatformV1CancelTuningJobRequest) *ProjectsLocationsTuningJobsCancelCall { + c := &ProjectsLocationsTuningJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1canceltuningjobrequest = googlecloudaiplatformv1canceltuningjobrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTuningJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsTuningJobsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTuningJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsTuningJobsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTuningJobsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTuningJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1canceltuningjobrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + 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 "aiplatform.projects.locations.tuningJobs.cancel" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsTuningJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use GenAiTuningService.GetTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it becomes a job with a TuningJob.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and TuningJob.state is set to `CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tuningJobs/{tuningJobsId}:cancel", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.tuningJobs.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the TuningJob to cancel. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/tuningJobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "GoogleCloudAiplatformV1CancelTuningJobRequest" + // }, + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.tuningJobs.create": + +type ProjectsLocationsTuningJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1tuningjob *GoogleCloudAiplatformV1TuningJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a TuningJob. A created TuningJob right away will be +// attempted to be run. +// +// - parent: The resource name of the Location to create the TuningJob +// in. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsTuningJobsService) Create(parent string, googlecloudaiplatformv1tuningjob *GoogleCloudAiplatformV1TuningJob) *ProjectsLocationsTuningJobsCreateCall { + c := &ProjectsLocationsTuningJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1tuningjob = googlecloudaiplatformv1tuningjob + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTuningJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTuningJobsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTuningJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsTuningJobsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTuningJobsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTuningJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1tuningjob) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tuningJobs") + 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 "aiplatform.projects.locations.tuningJobs.create" call. +// Exactly one of *GoogleCloudAiplatformV1TuningJob or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudAiplatformV1TuningJob.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 *ProjectsLocationsTuningJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1TuningJob, 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 := &GoogleCloudAiplatformV1TuningJob{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a TuningJob. A created TuningJob right away will be attempted to be run.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tuningJobs", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.tuningJobs.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the Location to create the TuningJob in. Format: `projects/{project}/locations/{location}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/tuningJobs", + // "request": { + // "$ref": "GoogleCloudAiplatformV1TuningJob" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1TuningJob" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.tuningJobs.get": + +type ProjectsLocationsTuningJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a TuningJob. +// +// - name: The name of the TuningJob resource. Format: +// `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`. +func (r *ProjectsLocationsTuningJobsService) Get(name string) *ProjectsLocationsTuningJobsGetCall { + c := &ProjectsLocationsTuningJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTuningJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTuningJobsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsTuningJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTuningJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTuningJobsGetCall) Context(ctx context.Context) *ProjectsLocationsTuningJobsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTuningJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTuningJobsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.tuningJobs.get" call. +// Exactly one of *GoogleCloudAiplatformV1TuningJob or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudAiplatformV1TuningJob.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 *ProjectsLocationsTuningJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1TuningJob, 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 := &GoogleCloudAiplatformV1TuningJob{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a TuningJob.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tuningJobs/{tuningJobsId}", + // "httpMethod": "GET", + // "id": "aiplatform.projects.locations.tuningJobs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the TuningJob resource. Format: `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/tuningJobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudAiplatformV1TuningJob" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.tuningJobs.list": + +type ProjectsLocationsTuningJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists TuningJobs in a Location. +// +// - parent: The resource name of the Location to list the TuningJobs +// from. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsTuningJobsService) List(parent string) *ProjectsLocationsTuningJobsListCall { + c := &ProjectsLocationsTuningJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsTuningJobsListCall) Filter(filter string) *ProjectsLocationsTuningJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsTuningJobsListCall) PageSize(pageSize int64) *ProjectsLocationsTuningJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. Typically obtained via ListTuningJob.next_page_token of +// the previous GenAiTuningService.ListTuningJob][] call. +func (c *ProjectsLocationsTuningJobsListCall) PageToken(pageToken string) *ProjectsLocationsTuningJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTuningJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTuningJobsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsTuningJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTuningJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsTuningJobsListCall) Context(ctx context.Context) *ProjectsLocationsTuningJobsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsTuningJobsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTuningJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tuningJobs") + 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 "aiplatform.projects.locations.tuningJobs.list" call. +// Exactly one of *GoogleCloudAiplatformV1ListTuningJobsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAiplatformV1ListTuningJobsResponse.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 *ProjectsLocationsTuningJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListTuningJobsResponse, 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 := &GoogleCloudAiplatformV1ListTuningJobsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists TuningJobs in a Location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tuningJobs", + // "httpMethod": "GET", + // "id": "aiplatform.projects.locations.tuningJobs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. The standard list page token. Typically obtained via ListTuningJob.next_page_token of the previous GenAiTuningService.ListTuningJob][] call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the Location to list the TuningJobs from. Format: `projects/{project}/locations/{location}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/tuningJobs", + // "response": { + // "$ref": "GoogleCloudAiplatformV1ListTuningJobsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsTuningJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListTuningJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "aiplatform.projects.locations.tuningJobs.operations.cancel": type ProjectsLocationsTuningJobsOperationsCancelCall struct { diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index 56baf478f40..1885af13529 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -350,6 +350,61 @@ } }, "projects": { + "methods": { + "getCacheConfig": { + "description": "Gets a GenAI cache config.", + "flatPath": "v1beta1/projects/{projectsId}/cacheConfig", + "httpMethod": "GET", + "id": "aiplatform.projects.getCacheConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the cache config. Format: - `projects/{project}/cacheConfig`.", + "location": "path", + "pattern": "^projects/[^/]+/cacheConfig$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleCloudAiplatformV1beta1CacheConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateCacheConfig": { + "description": "Updates a cache config.", + "flatPath": "v1beta1/projects/{projectsId}/cacheConfig", + "httpMethod": "PATCH", + "id": "aiplatform.projects.updateCacheConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the cache config. Format: - `projects/{project}/cacheConfig`.", + "location": "path", + "pattern": "^projects/[^/]+/cacheConfig$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1CacheConfig" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "locations": { "methods": { @@ -3828,6 +3883,38 @@ } }, "resources": { + "chat": { + "methods": { + "completions": { + "description": "Exposes an OpenAI-compatible endpoint for chat completions.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}/chat/completions", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.chat.completions", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/openapi`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}/chat/completions", + "request": { + "$ref": "GoogleApiHttpBody" + }, + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "operations": { "methods": { "cancel": { @@ -18738,7 +18825,7 @@ } } }, - "revision": "20240322", + "revision": "20240328", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionEmbedVideoResponse": { @@ -19335,6 +19422,10 @@ "CloudAiNlLlmProtoServiceMessageMetadata": { "id": "CloudAiNlLlmProtoServiceMessageMetadata", "properties": { + "factualityDebugMetadata": { + "$ref": "LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata", + "description": "Factuality-related debug metadata." + }, "inputFilterInfo": { "$ref": "LearningServingLlmMessageMetadata", "description": "Filter metadata of the input messages." @@ -19543,6 +19634,13 @@ }, "type": "array" }, + "translationRequestInfos": { + "description": "Translation request info during RAI for debugging purpose. Each TranslationRequestInfo corresponds to a request sent to the translation server.", + "items": { + "$ref": "LearningGenaiRootTranslationRequestInfo" + }, + "type": "array" + }, "triggeredBlocklist": { "description": "Whether the text triggered the blocklist.", "type": "boolean" @@ -20243,12 +20341,12 @@ ], "enumDescriptions": [ "", - "", - "", - "", - "", - "", - "" + "No Auth.", + "API Key Auth.", + "HTTP Basic Auth.", + "Google Service Account Auth.", + "OAuth auth.", + "OpenID Connect (OIDC) Auth." ], "type": "string" }, @@ -20296,11 +20394,11 @@ ], "enumDescriptions": [ "", - "", - "", - "", - "", - "" + "Element is in the HTTP request query.", + "Element is in the HTTP request header.", + "Element is in the HTTP request path.", + "Element is in the HTTP request body.", + "Element is in the HTTP request cookie." ], "type": "string" }, @@ -21213,6 +21311,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1CacheConfig": { + "description": "Config of GenAI caching features. This is a singleton resource.", + "id": "GoogleCloudAiplatformV1beta1CacheConfig", + "properties": { + "disableCache": { + "description": "If set to true, disables GenAI caching. Otherwise caching is enabled.", + "type": "boolean" + }, + "name": { + "description": "Identifier. Name of the cache config. Format: - `projects/{project}/cacheConfig`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1CancelBatchPredictionJobRequest": { "description": "Request message for JobService.CancelBatchPredictionJob.", "id": "GoogleCloudAiplatformV1beta1CancelBatchPredictionJobRequest", @@ -23451,14 +23564,6 @@ "$ref": "GoogleCloudAiplatformV1beta1QuestionAnsweringRelevanceInput", "description": "Input for question answering relevance metric." }, - "ragContextRecallInput": { - "$ref": "GoogleCloudAiplatformV1beta1RagContextRecallInput", - "description": "Input for rag context recall metric." - }, - "responseRecallInput": { - "$ref": "GoogleCloudAiplatformV1beta1ResponseRecallInput", - "description": "Input for response recall metric." - }, "rougeInput": { "$ref": "GoogleCloudAiplatformV1beta1RougeInput", "description": "Instances and metric spec for rouge metric." @@ -23550,14 +23655,6 @@ "$ref": "GoogleCloudAiplatformV1beta1QuestionAnsweringRelevanceResult", "description": "Result for question answering relevance metric." }, - "ragContextRecallResult": { - "$ref": "GoogleCloudAiplatformV1beta1RagContextRecallResult", - "description": "RAG only metrics. Result for context recall metric." - }, - "responseRecallResult": { - "$ref": "GoogleCloudAiplatformV1beta1ResponseRecallResult", - "description": "Result for response recall metric." - }, "rougeResults": { "$ref": "GoogleCloudAiplatformV1beta1RougeResults", "description": "Results for rouge metric." @@ -24773,6 +24870,14 @@ "description": "Identifier. The resource name of the Extension.", "type": "string" }, + "privateServiceConnectConfig": { + "$ref": "GoogleCloudAiplatformV1beta1ExtensionPrivateServiceConnectConfig", + "description": "Optional. The PrivateServiceConnect config for the extension. If specified, the service endpoints associated with the Extension should be registered with private network access in the provided Service Directory (https://cloud.google.com/service-directory/docs/configuring-private-network-access). If the service contains more than one endpoint with a network, the service will arbitrarilty choose one of the endpoints to use for extension execution." + }, + "runtimeConfig": { + "$ref": "GoogleCloudAiplatformV1beta1RuntimeConfig", + "description": "Optional. Runtime config controlling the runtime behavior of this Extension." + }, "toolUseExamples": { "description": "Optional. Examples to illustrate the usage of the extension as a tool.", "items": { @@ -24843,6 +24948,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ExtensionPrivateServiceConnectConfig": { + "description": "PrivateExtensionConfig configuration for the extension.", + "id": "GoogleCloudAiplatformV1beta1ExtensionPrivateServiceConnectConfig", + "properties": { + "serviceDirectory": { + "description": "Required. The Service Directory resource name in which the service endpoints associated to the extension are registered. Format: `projects/{project_id}/locations/{location_id}/namespaces/{namespace_id}/services/{service_id}` - The Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) should be granted `servicedirectory.viewer` and `servicedirectory.pscAuthorizedService` roles on the resource.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Feature": { "description": "Feature Metadata information. For example, color is a feature that describes an apple.", "id": "GoogleCloudAiplatformV1beta1Feature", @@ -26031,7 +26147,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1FindNeighborsRequest": { - "description": "LINT.IfChange The request message for MatchService.FindNeighbors.", + "description": "The request message for MatchService.FindNeighbors.", "id": "GoogleCloudAiplatformV1beta1FindNeighborsRequest", "properties": { "deployedIndexId": { @@ -26580,6 +26696,10 @@ "format": "float", "type": "number" }, + "responseMimeType": { + "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: `text/plain`: (default) Text output. `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", + "type": "string" + }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -30803,7 +30923,8 @@ "OP_IN_DATAPOINT", "MULTIPLE_VALUES", "INVALID_NUMERIC_VALUE", - "INVALID_ENCODING" + "INVALID_ENCODING", + "INVALID_SPARSE_DIMENSIONS" ], "enumDescriptions": [ "Default, shall not be used.", @@ -30819,7 +30940,8 @@ "Numeric restrict has operator specified in datapoint.", "Numeric restrict has multiple values specified.", "Numeric restrict has invalid numeric value specified.", - "File is not in UTF_8 format." + "File is not in UTF_8 format.", + "Error parsing sparse dimensions field." ], "type": "string" }, @@ -31267,7 +31389,7 @@ "type": "string" }, "context": { - "description": "Optional. Text to answer the question.", + "description": "Required. Text to answer the question.", "type": "string" }, "instruction": { @@ -32417,10 +32539,6 @@ "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke", "description": "Optional. Deploy PublisherModel to Google Kubernetes Engine." }, - "multiDeployVertex": { - "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex", - "description": "Optional. Multiple setups to deploy the PublisherModel to Vertex Endpoint." - }, "openEvaluationPipeline": { "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences", "description": "Optional. Open evaluation pipeline of the PublisherModel." @@ -32521,20 +32639,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex": { - "description": "Multiple setups to deploy the PublisherModel.", - "id": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex", - "properties": { - "multiDeployVertex": { - "description": "Optional. One click deployment configurations.", - "items": { - "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeploy" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines": { "description": "Open fine tuning pipelines.", "id": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines", @@ -33107,7 +33211,7 @@ "id": "GoogleCloudAiplatformV1beta1QuestionAnsweringQualityInstance", "properties": { "context": { - "description": "Optional. Text to answer the question.", + "description": "Required. Text to answer the question.", "type": "string" }, "instruction": { @@ -33243,72 +33347,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1RagContextRecallInput": { - "description": "Input for rag context recall metric.", - "id": "GoogleCloudAiplatformV1beta1RagContextRecallInput", - "properties": { - "instance": { - "$ref": "GoogleCloudAiplatformV1beta1RagContextRecallInstance", - "description": "Required. Rag context recall instance." - }, - "metricSpec": { - "$ref": "GoogleCloudAiplatformV1beta1RagContextRecallSpec", - "description": "Required. Spec for rag context recall metric." - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1RagContextRecallInstance": { - "description": "Spec for rag context recall instance.", - "id": "GoogleCloudAiplatformV1beta1RagContextRecallInstance", - "properties": { - "context": { - "description": "Required. Retrieved facts from RAG pipeline as context to be evaluated.", - "type": "string" - }, - "reference": { - "description": "Required. Ground truth used to compare against the context.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1RagContextRecallResult": { - "description": "Spec for rag context recall result.", - "id": "GoogleCloudAiplatformV1beta1RagContextRecallResult", - "properties": { - "confidence": { - "description": "Output only. Confidence for rag context recall score.", - "format": "float", - "readOnly": true, - "type": "number" - }, - "explanation": { - "description": "Output only. Explanation for rag context recall score.", - "readOnly": true, - "type": "string" - }, - "score": { - "description": "Output only. RagContextRecall score.", - "format": "float", - "readOnly": true, - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1RagContextRecallSpec": { - "description": "Spec for rag context recall metric.", - "id": "GoogleCloudAiplatformV1beta1RagContextRecallSpec", - "properties": { - "version": { - "description": "Optional. Which version to use for evaluation.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1RagContexts": { "description": "Relevant contexts for one query.", "id": "GoogleCloudAiplatformV1beta1RagContexts", @@ -34068,72 +34106,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1ResponseRecallInput": { - "description": "Input for response recall metric.", - "id": "GoogleCloudAiplatformV1beta1ResponseRecallInput", - "properties": { - "instance": { - "$ref": "GoogleCloudAiplatformV1beta1ResponseRecallInstance", - "description": "Required. Response recall instance." - }, - "metricSpec": { - "$ref": "GoogleCloudAiplatformV1beta1ResponseRecallSpec", - "description": "Required. Spec for response recall score metric." - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1ResponseRecallInstance": { - "description": "Spec for response recall instance.", - "id": "GoogleCloudAiplatformV1beta1ResponseRecallInstance", - "properties": { - "prediction": { - "description": "Required. Output of the evaluated model.", - "type": "string" - }, - "reference": { - "description": "Required. Ground truth used to compare against the prediction.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1ResponseRecallResult": { - "description": "Spec for response recall result.", - "id": "GoogleCloudAiplatformV1beta1ResponseRecallResult", - "properties": { - "confidence": { - "description": "Output only. Confidence for fulfillment score.", - "format": "float", - "readOnly": true, - "type": "number" - }, - "explanation": { - "description": "Output only. Explanation for response recall score.", - "readOnly": true, - "type": "string" - }, - "score": { - "description": "Output only. ResponseRecall score.", - "format": "float", - "readOnly": true, - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1ResponseRecallSpec": { - "description": "Spec for response recall metric.", - "id": "GoogleCloudAiplatformV1beta1ResponseRecallSpec", - "properties": { - "version": { - "description": "Optional. Which version to use for evaluation.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1RestoreDatasetVersionOperationMetadata": { "description": "Runtime operation information for DatasetService.RestoreDatasetVersion.", "id": "GoogleCloudAiplatformV1beta1RestoreDatasetVersionOperationMetadata", @@ -34301,6 +34273,53 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1RuntimeConfig": { + "description": "Runtime configuration to run the extension.", + "id": "GoogleCloudAiplatformV1beta1RuntimeConfig", + "properties": { + "codeInterpreterRuntimeConfig": { + "$ref": "GoogleCloudAiplatformV1beta1RuntimeConfigCodeInterpreterRuntimeConfig", + "description": "Code execution runtime configurations for code interpreter extension." + }, + "defaultParams": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Default parameters that will be set for all the execution of this extension. If specified, the parameter values can be overridden by values in [[ExecuteExtensionRequest.operation_params]] at request time. The struct should be in a form of map with param name as the key and actual param value as the value. E.g. If this operation requires a param \"name\" to be set to \"abc\". you can set this to something like {\"name\": \"abc\"}.", + "type": "object" + }, + "vertexAiSearchRuntimeConfig": { + "$ref": "GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig", + "description": "Runtime configuration for Vertext AI Search extension." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1RuntimeConfigCodeInterpreterRuntimeConfig": { + "id": "GoogleCloudAiplatformV1beta1RuntimeConfigCodeInterpreterRuntimeConfig", + "properties": { + "fileInputGcsBucket": { + "description": "Optional. The GCS bucket for file input of this Extension. If specified, support input from the GCS bucket. Vertex Extension Custom Code Service Agent should be granted file reader to this bucket. If not specified, the extension will only accept file contents from request body and reject GCS file inputs.", + "type": "string" + }, + "fileOutputGcsBucket": { + "description": "Optional. The GCS bucket for file output of this Extension. If specified, write all output files to the GCS bucket. Vertex Extension Custom Code Service Agent should be granted file writer to this bucket. If not specified, the file content will be output in response body.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig": { + "id": "GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig", + "properties": { + "servingConfigName": { + "description": "Required. Vertext AI Search serving config name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}` or `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1SafetyInput": { "description": "Input for safety metric.", "id": "GoogleCloudAiplatformV1beta1SafetyInput", @@ -35453,6 +35472,78 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics": { + "description": "Metrics for general pairwise text generation evaluation results.", + "id": "GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics", + "properties": { + "accuracy": { + "description": "Fraction of cases where the autorater agreed with the human raters.", + "format": "float", + "type": "number" + }, + "baselineModelWinRate": { + "description": "Percentage of time the autorater decided the baseline model had the better response.", + "format": "float", + "type": "number" + }, + "cohensKappa": { + "description": "A measurement of agreement between the autorater and human raters that takes the likelihood of random agreement into account.", + "format": "float", + "type": "number" + }, + "f1Score": { + "description": "Harmonic mean of precision and recall.", + "format": "float", + "type": "number" + }, + "falseNegativeCount": { + "description": "Number of examples where the autorater chose the baseline model, but humans preferred the model.", + "format": "int64", + "type": "string" + }, + "falsePositiveCount": { + "description": "Number of examples where the autorater chose the model, but humans preferred the baseline model.", + "format": "int64", + "type": "string" + }, + "humanPreferenceBaselineModelWinRate": { + "description": "Percentage of time humans decided the baseline model had the better response.", + "format": "float", + "type": "number" + }, + "humanPreferenceModelWinRate": { + "description": "Percentage of time humans decided the model had the better response.", + "format": "float", + "type": "number" + }, + "modelWinRate": { + "description": "Percentage of time the autorater decided the model had the better response.", + "format": "float", + "type": "number" + }, + "precision": { + "description": "Fraction of cases where the autorater and humans thought the model had a better response out of all cases where the autorater thought the model had a better response. True positive divided by all positive.", + "format": "float", + "type": "number" + }, + "recall": { + "description": "Fraction of cases where the autorater and humans thought the model had a better response out of all cases where the humans thought the model had a better response.", + "format": "float", + "type": "number" + }, + "trueNegativeCount": { + "description": "Number of examples where both the autorater and humans decided that the model had the worse response.", + "format": "int64", + "type": "string" + }, + "truePositiveCount": { + "description": "Number of examples where both the autorater and humans decided that the model had the better response.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsQuestionAnsweringEvaluationMetrics": { "id": "GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsQuestionAnsweringEvaluationMetrics", "properties": { @@ -38692,7 +38783,7 @@ "type": "boolean" }, "serviceAccount": { - "description": "Optional. Default service account that this PersistentResource's workloads run as. The workloads include: * Any runtime specified via `ResourceRuntimeSpec` on creation time, for example, Ray. * Jobs submitted to PersistentResource, if no other service account specified in the job specs. Only works when custom service account is enabled and users have the `iam.serviceAccounts.actAs` permission on this service account. Required if any containers are specified in `ResourceRuntimeSpec`.", + "description": "Optional. Required when all below conditions are met * `enable_custom_service_account` is true; * any runtime is specified via `ResourceRuntimeSpec` on creation time, for example, Ray The users must have `iam.serviceAccounts.actAs` permission on this service account and then the specified runtime containers will run as it. Do not set this field if you want to submit jobs using custom service account to this PersistentResource after creation, but only specify the `service_account` inside the job.", "type": "string" } }, @@ -42407,7 +42498,13 @@ "CLOUD_GEMIT_AMPS", "CLOUD_GEMIT_AQUA", "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA", - "CLOUD_GEMIT_GSM8K_SCHEMA" + "CLOUD_GEMIT_GSM8K_SCHEMA", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR", + "GEMINI_V1_TAIL_PATCH_GOALDMINE", + "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" ], "enumDescriptions": [ "", @@ -42734,6 +42831,12 @@ "", "", "", + "", + "Gemini V1 tail patch translation.", + "", + "", + "", + "Gemini V1 tail patch others.", "" ], "type": "string" @@ -43175,7 +43278,13 @@ "CLOUD_GEMIT_AMPS", "CLOUD_GEMIT_AQUA", "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA", - "CLOUD_GEMIT_GSM8K_SCHEMA" + "CLOUD_GEMIT_GSM8K_SCHEMA", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR", + "GEMINI_V1_TAIL_PATCH_GOALDMINE", + "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" ], "enumDescriptions": [ "", @@ -43502,6 +43611,12 @@ "", "", "", + "", + "Gemini V1 tail patch translation.", + "", + "", + "", + "Gemini V1 tail patch others.", "" ], "type": "string" @@ -43954,7 +44069,13 @@ "CLOUD_GEMIT_AMPS", "CLOUD_GEMIT_AQUA", "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA", - "CLOUD_GEMIT_GSM8K_SCHEMA" + "CLOUD_GEMIT_GSM8K_SCHEMA", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR", + "GEMINI_V1_TAIL_PATCH_GOALDMINE", + "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" ], "enumDescriptions": [ "", @@ -44074,7 +44195,7 @@ "", "", "", - "Github Github dataset with license info. We prefer this to help cite proper licenses for code recitation.", + "GitHub dataset with license info. We prefer this to help cite proper licenses for code recitation.", "", "", "", @@ -44281,6 +44402,12 @@ "", "", "", + "", + "Gemini V1 tail patch translation.", + "", + "", + "", + "Gemini V1 tail patch others.", "" ], "type": "string" @@ -44722,7 +44849,13 @@ "CLOUD_GEMIT_AMPS", "CLOUD_GEMIT_AQUA", "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA", - "CLOUD_GEMIT_GSM8K_SCHEMA" + "CLOUD_GEMIT_GSM8K_SCHEMA", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY", + "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR", + "GEMINI_V1_TAIL_PATCH_GOALDMINE", + "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" ], "enumDescriptions": [ "", @@ -44842,7 +44975,7 @@ "", "", "", - "Github Github dataset with license info. We prefer this to help cite proper licenses for code recitation.", + "GitHub dataset with license info. We prefer this to help cite proper licenses for code recitation.", "", "", "", @@ -45049,6 +45182,12 @@ "", "", "", + "", + "Gemini V1 tail patch translation.", + "", + "", + "", + "Gemini V1 tail patch others.", "" ], "type": "string" @@ -45893,6 +46032,25 @@ }, "type": "object" }, + "LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata": { + "id": "LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata", + "properties": { + "factRetrievalMillisecondsByProvider": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "Latency spent on fact retrievals. There might be multiple retrievals from different fact providers.", + "type": "object" + }, + "prompt2queryMilliseconds": { + "description": "Latency spent on prompt2query. The procedure generates a search-friendly query given the original prompt.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "LearningGenaiRootRAIOutput": { "description": "This is per harm.", "id": "LearningGenaiRootRAIOutput", @@ -46354,6 +46512,25 @@ }, "type": "object" }, + "LearningGenaiRootTranslationRequestInfo": { + "description": "Each TranslationRequestInfo corresponds to a request sent to the translation server.", + "id": "LearningGenaiRootTranslationRequestInfo", + "properties": { + "detectedLanguageCodes": { + "description": "The ISO-639 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.", + "items": { + "type": "string" + }, + "type": "array" + }, + "totalContentSize": { + "description": "The sum of the size of all the contents in the request.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "LearningServingLlmMessageMetadata": { "description": "LINT.IfChange This metadata contains additional information required for debugging.", "id": "LearningServingLlmMessageMetadata", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 5e5d50f571b..0f56c4c7705 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -539,6 +539,7 @@ type ProjectsLocationsEdgeDevicesOperationsService struct { func NewProjectsLocationsEndpointsService(s *Service) *ProjectsLocationsEndpointsService { rs := &ProjectsLocationsEndpointsService{s: s} + rs.Chat = NewProjectsLocationsEndpointsChatService(s) rs.Operations = NewProjectsLocationsEndpointsOperationsService(s) return rs } @@ -546,9 +547,20 @@ func NewProjectsLocationsEndpointsService(s *Service) *ProjectsLocationsEndpoint type ProjectsLocationsEndpointsService struct { s *Service + Chat *ProjectsLocationsEndpointsChatService + Operations *ProjectsLocationsEndpointsOperationsService } +func NewProjectsLocationsEndpointsChatService(s *Service) *ProjectsLocationsEndpointsChatService { + rs := &ProjectsLocationsEndpointsChatService{s: s} + return rs +} + +type ProjectsLocationsEndpointsChatService struct { + s *Service +} + func NewProjectsLocationsEndpointsOperationsService(s *Service) *ProjectsLocationsEndpointsOperationsService { rs := &ProjectsLocationsEndpointsOperationsService{s: s} return rs @@ -2473,6 +2485,9 @@ func (s *CloudAiNlLlmProtoServiceGenerateMultiModalResponse) MarshalJSON() ([]by } type CloudAiNlLlmProtoServiceMessageMetadata struct { + // FactualityDebugMetadata: Factuality-related debug metadata. + FactualityDebugMetadata *LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata `json:"factualityDebugMetadata,omitempty"` + // InputFilterInfo: Filter metadata of the input messages. InputFilterInfo *LearningServingLlmMessageMetadata `json:"inputFilterInfo,omitempty"` @@ -2483,18 +2498,19 @@ type CloudAiNlLlmProtoServiceMessageMetadata struct { // OutputFilterInfo: Filter metadata of the output messages. OutputFilterInfo []*LearningServingLlmMessageMetadata `json:"outputFilterInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "InputFilterInfo") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "FactualityDebugMetadata") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InputFilterInfo") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "FactualityDebugMetadata") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. @@ -2794,6 +2810,11 @@ type CloudAiNlLlmProtoServiceRaiResult struct { // RaiSignals: The RAI signals for the text. RaiSignals []*CloudAiNlLlmProtoServiceRaiSignal `json:"raiSignals,omitempty"` + // TranslationRequestInfos: Translation request info during RAI for + // debugging purpose. Each TranslationRequestInfo corresponds to a + // request sent to the translation server. + TranslationRequestInfos []*LearningGenaiRootTranslationRequestInfo `json:"translationRequestInfos,omitempty"` + // TriggeredBlocklist: Whether the text triggered the blocklist. TriggeredBlocklist bool `json:"triggeredBlocklist,omitempty"` @@ -3840,12 +3861,12 @@ type GoogleCloudAiplatformV1beta1AuthConfig struct { // // Possible values: // "AUTH_TYPE_UNSPECIFIED" - // "NO_AUTH" - // "API_KEY_AUTH" - // "HTTP_BASIC_AUTH" - // "GOOGLE_SERVICE_ACCOUNT_AUTH" - // "OAUTH" - // "OIDC_AUTH" + // "NO_AUTH" - No Auth. + // "API_KEY_AUTH" - API Key Auth. + // "HTTP_BASIC_AUTH" - HTTP Basic Auth. + // "GOOGLE_SERVICE_ACCOUNT_AUTH" - Google Service Account Auth. + // "OAUTH" - OAuth auth. + // "OIDC_AUTH" - OpenID Connect (OIDC) Auth. AuthType string `json:"authType,omitempty"` // GoogleServiceAccountConfig: Config for Google Service Account auth. @@ -3902,11 +3923,11 @@ type GoogleCloudAiplatformV1beta1AuthConfigApiKeyConfig struct { // // Possible values: // "HTTP_IN_UNSPECIFIED" - // "HTTP_IN_QUERY" - // "HTTP_IN_HEADER" - // "HTTP_IN_PATH" - // "HTTP_IN_BODY" - // "HTTP_IN_COOKIE" + // "HTTP_IN_QUERY" - Element is in the HTTP request query. + // "HTTP_IN_HEADER" - Element is in the HTTP request header. + // "HTTP_IN_PATH" - Element is in the HTTP request path. + // "HTTP_IN_BODY" - Element is in the HTTP request body. + // "HTTP_IN_COOKIE" - Element is in the HTTP request cookie. HttpElementLocation string `json:"httpElementLocation,omitempty"` // Name: Required. The parameter name of the API key. E.g. If the API @@ -5861,6 +5882,44 @@ func (s *GoogleCloudAiplatformV1beta1BoolArray) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1CacheConfig: Config of GenAI caching +// features. This is a singleton resource. +type GoogleCloudAiplatformV1beta1CacheConfig struct { + // DisableCache: If set to true, disables GenAI caching. Otherwise + // caching is enabled. + DisableCache bool `json:"disableCache,omitempty"` + + // Name: Identifier. Name of the cache config. Format: - + // `projects/{project}/cacheConfig`. + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisableCache") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisableCache") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1CacheConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1CacheConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1CancelBatchPredictionJobRequest: Request // message for JobService.CancelBatchPredictionJob. type GoogleCloudAiplatformV1beta1CancelBatchPredictionJobRequest struct { @@ -10084,12 +10143,6 @@ type GoogleCloudAiplatformV1beta1EvaluateInstancesRequest struct { // relevance metric. QuestionAnsweringRelevanceInput *GoogleCloudAiplatformV1beta1QuestionAnsweringRelevanceInput `json:"questionAnsweringRelevanceInput,omitempty"` - // RagContextRecallInput: Input for rag context recall metric. - RagContextRecallInput *GoogleCloudAiplatformV1beta1RagContextRecallInput `json:"ragContextRecallInput,omitempty"` - - // ResponseRecallInput: Input for response recall metric. - ResponseRecallInput *GoogleCloudAiplatformV1beta1ResponseRecallInput `json:"responseRecallInput,omitempty"` - // RougeInput: Instances and metric spec for rouge metric. RougeInput *GoogleCloudAiplatformV1beta1RougeInput `json:"rougeInput,omitempty"` @@ -10193,13 +10246,6 @@ type GoogleCloudAiplatformV1beta1EvaluateInstancesResponse struct { // relevance metric. QuestionAnsweringRelevanceResult *GoogleCloudAiplatformV1beta1QuestionAnsweringRelevanceResult `json:"questionAnsweringRelevanceResult,omitempty"` - // RagContextRecallResult: RAG only metrics. Result for context recall - // metric. - RagContextRecallResult *GoogleCloudAiplatformV1beta1RagContextRecallResult `json:"ragContextRecallResult,omitempty"` - - // ResponseRecallResult: Result for response recall metric. - ResponseRecallResult *GoogleCloudAiplatformV1beta1ResponseRecallResult `json:"responseRecallResult,omitempty"` - // RougeResults: Results for rouge metric. RougeResults *GoogleCloudAiplatformV1beta1RougeResults `json:"rougeResults,omitempty"` @@ -12387,6 +12433,20 @@ type GoogleCloudAiplatformV1beta1Extension struct { // Name: Identifier. The resource name of the Extension. Name string `json:"name,omitempty"` + // PrivateServiceConnectConfig: Optional. The PrivateServiceConnect + // config for the extension. If specified, the service endpoints + // associated with the Extension should be registered with private + // network access in the provided Service Directory + // (https://cloud.google.com/service-directory/docs/configuring-private-network-access). + // If the service contains more than one endpoint with a network, the + // service will arbitrarilty choose one of the endpoints to use for + // extension execution. + PrivateServiceConnectConfig *GoogleCloudAiplatformV1beta1ExtensionPrivateServiceConnectConfig `json:"privateServiceConnectConfig,omitempty"` + + // RuntimeConfig: Optional. Runtime config controlling the runtime + // behavior of this Extension. + RuntimeConfig *GoogleCloudAiplatformV1beta1RuntimeConfig `json:"runtimeConfig,omitempty"` + // ToolUseExamples: Optional. Examples to illustrate the usage of the // extension as a tool. ToolUseExamples []*GoogleCloudAiplatformV1beta1ToolUseExample `json:"toolUseExamples,omitempty"` @@ -12534,6 +12594,43 @@ func (s *GoogleCloudAiplatformV1beta1ExtensionOperation) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ExtensionPrivateServiceConnectConfig: +// PrivateExtensionConfig configuration for the extension. +type GoogleCloudAiplatformV1beta1ExtensionPrivateServiceConnectConfig struct { + // ServiceDirectory: Required. The Service Directory resource name in + // which the service endpoints associated to the extension are + // registered. Format: + // `projects/{project_id}/locations/{location_id}/namespaces/{namespace_i + // d}/services/{service_id}` - The Vertex AI Extension Service Agent + // (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + // should be granted `servicedirectory.viewer` and + // `servicedirectory.pscAuthorizedService` roles on the resource. + ServiceDirectory string `json:"serviceDirectory,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServiceDirectory") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ServiceDirectory") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1ExtensionPrivateServiceConnectConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ExtensionPrivateServiceConnectConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Feature: Feature Metadata information. // For example, color is a feature that describes an apple. type GoogleCloudAiplatformV1beta1Feature struct { @@ -14713,8 +14810,8 @@ func (s *GoogleCloudAiplatformV1beta1FilterSplit) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1FindNeighborsRequest: LINT.IfChange The -// request message for MatchService.FindNeighbors. +// GoogleCloudAiplatformV1beta1FindNeighborsRequest: The request message +// for MatchService.FindNeighbors. type GoogleCloudAiplatformV1beta1FindNeighborsRequest struct { // DeployedIndexId: The ID of the DeployedIndex that will serve the // request. This request is sent to a specific IndexEndpoint, as per the @@ -15807,6 +15904,13 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { // PresencePenalty: Optional. Positive penalties. PresencePenalty float64 `json:"presencePenalty,omitempty"` + // ResponseMimeType: Optional. Output response mimetype of the generated + // candidate text. Supported mimetype: `text/plain`: (default) Text + // output. `application/json`: JSON response in the candidates. The + // model needs to be prompted to output the appropriate response type, + // otherwise the behavior is undefined. This is a preview feature. + ResponseMimeType string `json:"responseMimeType,omitempty"` + // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` @@ -23525,6 +23629,8 @@ type GoogleCloudAiplatformV1beta1NearestNeighborSearchOperationMetadataRecordErr // "INVALID_NUMERIC_VALUE" - Numeric restrict has invalid numeric // value specified. // "INVALID_ENCODING" - File is not in UTF_8 format. + // "INVALID_SPARSE_DIMENSIONS" - Error parsing sparse dimensions + // field. ErrorType string `json:"errorType,omitempty"` // RawRecord: The original content of this record. @@ -24225,7 +24331,7 @@ type GoogleCloudAiplatformV1beta1PairwiseQuestionAnsweringQualityInstance struct // BaselinePrediction: Required. Output of the baseline model. BaselinePrediction string `json:"baselinePrediction,omitempty"` - // Context: Optional. Text to answer the question. + // Context: Required. Text to answer the question. Context string `json:"context,omitempty"` // Instruction: Required. Question Answering prompt for LLM. @@ -26004,10 +26110,6 @@ type GoogleCloudAiplatformV1beta1PublisherModelCallToAction struct { // Engine. DeployGke *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke `json:"deployGke,omitempty"` - // MultiDeployVertex: Optional. Multiple setups to deploy the - // PublisherModel to Vertex Endpoint. - MultiDeployVertex *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex `json:"multiDeployVertex,omitempty"` - // OpenEvaluationPipeline: Optional. Open evaluation pipeline of the // PublisherModel. OpenEvaluationPipeline *GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences `json:"openEvaluationPipeline,omitempty"` @@ -26163,36 +26265,6 @@ func (s *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke) Marsha return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex: -// Multiple setups to deploy the PublisherModel. -type GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex struct { - // MultiDeployVertex: Optional. One click deployment configurations. - MultiDeployVertex []*GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeploy `json:"multiDeployVertex,omitempty"` - - // ForceSendFields is a list of field names (e.g. "MultiDeployVertex") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MultiDeployVertex") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPi // pelines: Open fine tuning pipelines. type GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines struct { @@ -27328,7 +27400,7 @@ func (s *GoogleCloudAiplatformV1beta1QuestionAnsweringQualityInput) MarshalJSON( // GoogleCloudAiplatformV1beta1QuestionAnsweringQualityInstance: Spec // for question answering quality instance. type GoogleCloudAiplatformV1beta1QuestionAnsweringQualityInstance struct { - // Context: Optional. Text to answer the question. + // Context: Required. Text to answer the question. Context string `json:"context,omitempty"` // Instruction: Required. Question Answering prompt for LLM. @@ -27609,152 +27681,6 @@ func (s *GoogleCloudAiplatformV1beta1QuestionAnsweringRelevanceSpec) MarshalJSON return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1RagContextRecallInput: Input for rag -// context recall metric. -type GoogleCloudAiplatformV1beta1RagContextRecallInput struct { - // Instance: Required. Rag context recall instance. - Instance *GoogleCloudAiplatformV1beta1RagContextRecallInstance `json:"instance,omitempty"` - - // MetricSpec: Required. Spec for rag context recall metric. - MetricSpec *GoogleCloudAiplatformV1beta1RagContextRecallSpec `json:"metricSpec,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instance") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1RagContextRecallInput) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RagContextRecallInput - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1RagContextRecallInstance: Spec for rag -// context recall instance. -type GoogleCloudAiplatformV1beta1RagContextRecallInstance struct { - // Context: Required. Retrieved facts from RAG pipeline as context to be - // evaluated. - Context string `json:"context,omitempty"` - - // Reference: Required. Ground truth used to compare against the - // context. - Reference string `json:"reference,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Context") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Context") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1RagContextRecallInstance) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RagContextRecallInstance - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1RagContextRecallResult: Spec for rag -// context recall result. -type GoogleCloudAiplatformV1beta1RagContextRecallResult struct { - // Confidence: Output only. Confidence for rag context recall score. - Confidence float64 `json:"confidence,omitempty"` - - // Explanation: Output only. Explanation for rag context recall score. - Explanation string `json:"explanation,omitempty"` - - // Score: Output only. RagContextRecall score. - Score float64 `json:"score,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Confidence") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1RagContextRecallResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RagContextRecallResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudAiplatformV1beta1RagContextRecallResult) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1beta1RagContextRecallResult - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - Score gensupport.JSONFloat64 `json:"score"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - s.Score = float64(s1.Score) - return nil -} - -// GoogleCloudAiplatformV1beta1RagContextRecallSpec: Spec for rag -// context recall metric. -type GoogleCloudAiplatformV1beta1RagContextRecallSpec struct { - // Version: Optional. Which version to use for evaluation. - Version int64 `json:"version,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Version") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Version") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1RagContextRecallSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RagContextRecallSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1RagContexts: Relevant contexts for one // query. type GoogleCloudAiplatformV1beta1RagContexts struct { @@ -29211,151 +29137,6 @@ func (s *GoogleCloudAiplatformV1beta1ResourcesConsumed) UnmarshalJSON(data []byt return nil } -// GoogleCloudAiplatformV1beta1ResponseRecallInput: Input for response -// recall metric. -type GoogleCloudAiplatformV1beta1ResponseRecallInput struct { - // Instance: Required. Response recall instance. - Instance *GoogleCloudAiplatformV1beta1ResponseRecallInstance `json:"instance,omitempty"` - - // MetricSpec: Required. Spec for response recall score metric. - MetricSpec *GoogleCloudAiplatformV1beta1ResponseRecallSpec `json:"metricSpec,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Instance") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Instance") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1ResponseRecallInput) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ResponseRecallInput - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1ResponseRecallInstance: Spec for response -// recall instance. -type GoogleCloudAiplatformV1beta1ResponseRecallInstance struct { - // Prediction: Required. Output of the evaluated model. - Prediction string `json:"prediction,omitempty"` - - // Reference: Required. Ground truth used to compare against the - // prediction. - Reference string `json:"reference,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Prediction") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Prediction") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1ResponseRecallInstance) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ResponseRecallInstance - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1ResponseRecallResult: Spec for response -// recall result. -type GoogleCloudAiplatformV1beta1ResponseRecallResult struct { - // Confidence: Output only. Confidence for fulfillment score. - Confidence float64 `json:"confidence,omitempty"` - - // Explanation: Output only. Explanation for response recall score. - Explanation string `json:"explanation,omitempty"` - - // Score: Output only. ResponseRecall score. - Score float64 `json:"score,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Confidence") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1ResponseRecallResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ResponseRecallResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudAiplatformV1beta1ResponseRecallResult) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1beta1ResponseRecallResult - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - Score gensupport.JSONFloat64 `json:"score"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - s.Score = float64(s1.Score) - return nil -} - -// GoogleCloudAiplatformV1beta1ResponseRecallSpec: Spec for response -// recall metric. -type GoogleCloudAiplatformV1beta1ResponseRecallSpec struct { - // Version: Optional. Which version to use for evaluation. - Version int64 `json:"version,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Version") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Version") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1ResponseRecallSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1ResponseRecallSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1RestoreDatasetVersionOperationMetadata: // Runtime operation information for // DatasetService.RestoreDatasetVersion. @@ -29735,6 +29516,124 @@ func (s *GoogleCloudAiplatformV1beta1RougeSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1RuntimeConfig: Runtime configuration to +// run the extension. +type GoogleCloudAiplatformV1beta1RuntimeConfig struct { + // CodeInterpreterRuntimeConfig: Code execution runtime configurations + // for code interpreter extension. + CodeInterpreterRuntimeConfig *GoogleCloudAiplatformV1beta1RuntimeConfigCodeInterpreterRuntimeConfig `json:"codeInterpreterRuntimeConfig,omitempty"` + + // DefaultParams: Optional. Default parameters that will be set for all + // the execution of this extension. If specified, the parameter values + // can be overridden by values in + // [[ExecuteExtensionRequest.operation_params]] at request time. The + // struct should be in a form of map with param name as the key and + // actual param value as the value. E.g. If this operation requires a + // param "name" to be set to "abc". you can set this to something like + // {"name": "abc"}. + DefaultParams googleapi.RawMessage `json:"defaultParams,omitempty"` + + // VertexAiSearchRuntimeConfig: Runtime configuration for Vertext AI + // Search extension. + VertexAiSearchRuntimeConfig *GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig `json:"vertexAiSearchRuntimeConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CodeInterpreterRuntimeConfig") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "CodeInterpreterRuntimeConfig") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1RuntimeConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RuntimeConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type GoogleCloudAiplatformV1beta1RuntimeConfigCodeInterpreterRuntimeConfig struct { + // FileInputGcsBucket: Optional. The GCS bucket for file input of this + // Extension. If specified, support input from the GCS bucket. Vertex + // Extension Custom Code Service Agent should be granted file reader to + // this bucket. If not specified, the extension will only accept file + // contents from request body and reject GCS file inputs. + FileInputGcsBucket string `json:"fileInputGcsBucket,omitempty"` + + // FileOutputGcsBucket: Optional. The GCS bucket for file output of this + // Extension. If specified, write all output files to the GCS bucket. + // Vertex Extension Custom Code Service Agent should be granted file + // writer to this bucket. If not specified, the file content will be + // output in response body. + FileOutputGcsBucket string `json:"fileOutputGcsBucket,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileInputGcsBucket") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FileInputGcsBucket") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1RuntimeConfigCodeInterpreterRuntimeConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RuntimeConfigCodeInterpreterRuntimeConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig struct { + // ServingConfigName: Required. Vertext AI Search serving config name. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/engi + // nes/{engine}/servingConfigs/{serving_config}` or + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/servingConfigs/{serving_config}` + ServingConfigName string `json:"servingConfigName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServingConfigName") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ServingConfigName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1SafetyInput: Input for safety metric. type GoogleCloudAiplatformV1beta1SafetyInput struct { // Instance: Required. Safety instance. @@ -31726,6 +31625,118 @@ func (s *GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsImageSegmentati return nil } +// GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsPairwiseTextGe +// nerationEvaluationMetrics: Metrics for general pairwise text +// generation evaluation results. +type GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics struct { + // Accuracy: Fraction of cases where the autorater agreed with the human + // raters. + Accuracy float64 `json:"accuracy,omitempty"` + + // BaselineModelWinRate: Percentage of time the autorater decided the + // baseline model had the better response. + BaselineModelWinRate float64 `json:"baselineModelWinRate,omitempty"` + + // CohensKappa: A measurement of agreement between the autorater and + // human raters that takes the likelihood of random agreement into + // account. + CohensKappa float64 `json:"cohensKappa,omitempty"` + + // F1Score: Harmonic mean of precision and recall. + F1Score float64 `json:"f1Score,omitempty"` + + // FalseNegativeCount: Number of examples where the autorater chose the + // baseline model, but humans preferred the model. + FalseNegativeCount int64 `json:"falseNegativeCount,omitempty,string"` + + // FalsePositiveCount: Number of examples where the autorater chose the + // model, but humans preferred the baseline model. + FalsePositiveCount int64 `json:"falsePositiveCount,omitempty,string"` + + // HumanPreferenceBaselineModelWinRate: Percentage of time humans + // decided the baseline model had the better response. + HumanPreferenceBaselineModelWinRate float64 `json:"humanPreferenceBaselineModelWinRate,omitempty"` + + // HumanPreferenceModelWinRate: Percentage of time humans decided the + // model had the better response. + HumanPreferenceModelWinRate float64 `json:"humanPreferenceModelWinRate,omitempty"` + + // ModelWinRate: Percentage of time the autorater decided the model had + // the better response. + ModelWinRate float64 `json:"modelWinRate,omitempty"` + + // Precision: Fraction of cases where the autorater and humans thought + // the model had a better response out of all cases where the autorater + // thought the model had a better response. True positive divided by all + // positive. + Precision float64 `json:"precision,omitempty"` + + // Recall: Fraction of cases where the autorater and humans thought the + // model had a better response out of all cases where the humans thought + // the model had a better response. + Recall float64 `json:"recall,omitempty"` + + // TrueNegativeCount: Number of examples where both the autorater and + // humans decided that the model had the worse response. + TrueNegativeCount int64 `json:"trueNegativeCount,omitempty,string"` + + // TruePositiveCount: Number of examples where both the autorater and + // humans decided that the model had the better response. + TruePositiveCount int64 `json:"truePositiveCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Accuracy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Accuracy") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsPairwiseTextGenerationEvaluationMetrics + var s1 struct { + Accuracy gensupport.JSONFloat64 `json:"accuracy"` + BaselineModelWinRate gensupport.JSONFloat64 `json:"baselineModelWinRate"` + CohensKappa gensupport.JSONFloat64 `json:"cohensKappa"` + F1Score gensupport.JSONFloat64 `json:"f1Score"` + HumanPreferenceBaselineModelWinRate gensupport.JSONFloat64 `json:"humanPreferenceBaselineModelWinRate"` + HumanPreferenceModelWinRate gensupport.JSONFloat64 `json:"humanPreferenceModelWinRate"` + ModelWinRate gensupport.JSONFloat64 `json:"modelWinRate"` + Precision gensupport.JSONFloat64 `json:"precision"` + Recall gensupport.JSONFloat64 `json:"recall"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Accuracy = float64(s1.Accuracy) + s.BaselineModelWinRate = float64(s1.BaselineModelWinRate) + s.CohensKappa = float64(s1.CohensKappa) + s.F1Score = float64(s1.F1Score) + s.HumanPreferenceBaselineModelWinRate = float64(s1.HumanPreferenceBaselineModelWinRate) + s.HumanPreferenceModelWinRate = float64(s1.HumanPreferenceModelWinRate) + s.ModelWinRate = float64(s1.ModelWinRate) + s.Precision = float64(s1.Precision) + s.Recall = float64(s1.Recall) + return nil +} + type GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsQuestionAnsweringEvaluationMetrics struct { // ExactMatch: The rate at which the input predicted strings exactly // match their references. @@ -38583,14 +38594,14 @@ type GoogleCloudAiplatformV1beta1ServiceAccountSpec struct { // (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). EnableCustomServiceAccount bool `json:"enableCustomServiceAccount,omitempty"` - // ServiceAccount: Optional. Default service account that this - // PersistentResource's workloads run as. The workloads include: * Any - // runtime specified via `ResourceRuntimeSpec` on creation time, for - // example, Ray. * Jobs submitted to PersistentResource, if no other - // service account specified in the job specs. Only works when custom - // service account is enabled and users have the - // `iam.serviceAccounts.actAs` permission on this service account. - // Required if any containers are specified in `ResourceRuntimeSpec`. + // ServiceAccount: Optional. Required when all below conditions are met + // * `enable_custom_service_account` is true; * any runtime is specified + // via `ResourceRuntimeSpec` on creation time, for example, Ray The + // users must have `iam.serviceAccounts.actAs` permission on this + // service account and then the specified runtime containers will run as + // it. Do not set this field if you want to submit jobs using custom + // service account to this PersistentResource after creation, but only + // specify the `service_account` inside the job. ServiceAccount string `json:"serviceAccount,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -45702,6 +45713,13 @@ type LanguageLabsAidaTrustRecitationProtoDocAttribution struct { // "CLOUD_GEMIT_AQUA" // "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA" // "CLOUD_GEMIT_GSM8K_SCHEMA" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN" - Gemini V1 tail patch + // translation. + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR" + // "GEMINI_V1_TAIL_PATCH_GOALDMINE" - Gemini V1 tail patch others. + // "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" Dataset string `json:"dataset,omitempty"` Filepath string `json:"filepath,omitempty"` @@ -46291,6 +46309,13 @@ type LanguageLabsAidaTrustRecitationProtoSegmentResult struct { // "CLOUD_GEMIT_AQUA" // "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA" // "CLOUD_GEMIT_GSM8K_SCHEMA" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN" - Gemini V1 tail patch + // translation. + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR" + // "GEMINI_V1_TAIL_PATCH_GOALDMINE" - Gemini V1 tail patch others. + // "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" AttributionDataset string `json:"attributionDataset,omitempty"` // DisplayAttributionMessage: human-friendly string that contains @@ -46571,9 +46596,8 @@ type LearningGenaiRecitationDocAttribution struct { // "GEMINI_V1_DOCJOIN_100B_EN_TOXICITY_TAGGED_GCC_FIXED_TAGS" // "GEMINI_V1_PUBMED" // "GEMINI_V1_WEB_MATH_V2" - // "GEMINI_V1_CMS_GITHUB_V7" - Github Github dataset with license - // info. We prefer this to help cite proper licenses for code - // recitation. + // "GEMINI_V1_CMS_GITHUB_V7" - GitHub dataset with license info. We + // prefer this to help cite proper licenses for code recitation. // "GEMINI_V1_CMS_GITHUB_DECONTAMINATED_V_7" // "GEMINI_V1_GITHUB_DIFF_WITH_COMMIT_MESSAGE_V2" // "GEMINI_V1_GITHUB_HTML_CSS_XML_V4" @@ -46875,6 +46899,13 @@ type LearningGenaiRecitationDocAttribution struct { // "CLOUD_GEMIT_AQUA" // "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA" // "CLOUD_GEMIT_GSM8K_SCHEMA" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN" - Gemini V1 tail patch + // translation. + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR" + // "GEMINI_V1_TAIL_PATCH_GOALDMINE" - Gemini V1 tail patch others. + // "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" Dataset string `json:"dataset,omitempty"` Filepath string `json:"filepath,omitempty"` @@ -47160,9 +47191,8 @@ type LearningGenaiRecitationSegmentResult struct { // "GEMINI_V1_DOCJOIN_100B_EN_TOXICITY_TAGGED_GCC_FIXED_TAGS" // "GEMINI_V1_PUBMED" // "GEMINI_V1_WEB_MATH_V2" - // "GEMINI_V1_CMS_GITHUB_V7" - Github Github dataset with license - // info. We prefer this to help cite proper licenses for code - // recitation. + // "GEMINI_V1_CMS_GITHUB_V7" - GitHub dataset with license info. We + // prefer this to help cite proper licenses for code recitation. // "GEMINI_V1_CMS_GITHUB_DECONTAMINATED_V_7" // "GEMINI_V1_GITHUB_DIFF_WITH_COMMIT_MESSAGE_V2" // "GEMINI_V1_GITHUB_HTML_CSS_XML_V4" @@ -47464,6 +47494,13 @@ type LearningGenaiRecitationSegmentResult struct { // "CLOUD_GEMIT_AQUA" // "CLOUD_GEMIT_COMMON_SENSE_REASONING_SCHEMA" // "CLOUD_GEMIT_GSM8K_SCHEMA" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_UN" - Gemini V1 tail patch + // translation. + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_EUROPARL" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_WMT_NEWSCOMMENTARY" + // "GEMINI_V1_TAIL_PATCH_TRANSLATION_2021_INCR" + // "GEMINI_V1_TAIL_PATCH_GOALDMINE" - Gemini V1 tail patch others. + // "GEMINI_V1_TAIL_PATCH_PHOTOMATH_IM2SOL_PROBLEM_AND_SOLUTION" AttributionDataset string `json:"attributionDataset,omitempty"` // DisplayAttributionMessage: human-friendly string that contains @@ -48522,6 +48559,42 @@ func (s *LearningGenaiRootMetricOutput) UnmarshalJSON(data []byte) error { return nil } +type LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata struct { + // FactRetrievalMillisecondsByProvider: Latency spent on fact + // retrievals. There might be multiple retrievals from different fact + // providers. + FactRetrievalMillisecondsByProvider map[string]string `json:"factRetrievalMillisecondsByProvider,omitempty"` + + // Prompt2queryMilliseconds: Latency spent on prompt2query. The + // procedure generates a search-friendly query given the original + // prompt. + Prompt2queryMilliseconds int64 `json:"prompt2queryMilliseconds,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "FactRetrievalMillisecondsByProvider") to unconditionally include in + // API requests. By default, fields with empty or default values are + // omitted from API requests. However, any non-pointer, non-interface + // field appearing in ForceSendFields will be sent to the server + // regardless of whether the field is empty or not. This may be used to + // include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "FactRetrievalMillisecondsByProvider") to include in API requests + // with the JSON null value. By default, fields with empty values are + // omitted from API requests. However, any field with an empty value + // appearing in NullFields will be sent to the server as null. It is an + // error if a field in this list has a non-empty value. This may be used + // to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata) MarshalJSON() ([]byte, error) { + type NoMethod LearningGenaiRootPerRequestProcessorDebugMetadataFactualityDebugMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LearningGenaiRootRAIOutput: This is per harm. type LearningGenaiRootRAIOutput struct { Allowed bool `json:"allowed,omitempty"` @@ -49417,6 +49490,45 @@ func (s *LearningGenaiRootToxicitySignal) UnmarshalJSON(data []byte) error { return nil } +// LearningGenaiRootTranslationRequestInfo: Each TranslationRequestInfo +// corresponds to a request sent to the translation server. +type LearningGenaiRootTranslationRequestInfo struct { + // DetectedLanguageCodes: The ISO-639 language code of source text in + // the initial request, detected automatically, if no source language + // was passed within the initial request. If the source language was + // passed, auto-detection of the language does not occur and this field + // is empty. + DetectedLanguageCodes []string `json:"detectedLanguageCodes,omitempty"` + + // TotalContentSize: The sum of the size of all the contents in the + // request. + TotalContentSize int64 `json:"totalContentSize,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "DetectedLanguageCodes") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedLanguageCodes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LearningGenaiRootTranslationRequestInfo) MarshalJSON() ([]byte, error) { + type NoMethod LearningGenaiRootTranslationRequestInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LearningServingLlmMessageMetadata: LINT.IfChange This metadata // contains additional information required for debugging. type LearningServingLlmMessageMetadata struct { @@ -50034,6 +50146,297 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo } +// method id "aiplatform.projects.getCacheConfig": + +type ProjectsGetCacheConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCacheConfig: Gets a GenAI cache config. +// +// - name: Name of the cache config. Format: - +// `projects/{project}/cacheConfig`. +func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCall { + c := &ProjectsGetCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsGetCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsGetCacheConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsGetCacheConfigCall) IfNoneMatch(entityTag string) *ProjectsGetCacheConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsGetCacheConfigCall) Context(ctx context.Context) *ProjectsGetCacheConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsGetCacheConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsGetCacheConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + 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 "aiplatform.projects.getCacheConfig" call. +// Exactly one of *GoogleCloudAiplatformV1beta1CacheConfig or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudAiplatformV1beta1CacheConfig.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 *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CacheConfig, 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 := &GoogleCloudAiplatformV1beta1CacheConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a GenAI cache config.", + // "flatPath": "v1beta1/projects/{projectsId}/cacheConfig", + // "httpMethod": "GET", + // "id": "aiplatform.projects.getCacheConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the cache config. Format: - `projects/{project}/cacheConfig`.", + // "location": "path", + // "pattern": "^projects/[^/]+/cacheConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleCloudAiplatformV1beta1CacheConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.updateCacheConfig": + +type ProjectsUpdateCacheConfigCall struct { + s *Service + name string + googlecloudaiplatformv1beta1cacheconfig *GoogleCloudAiplatformV1beta1CacheConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateCacheConfig: Updates a cache config. +// +// - name: Identifier. Name of the cache config. Format: - +// `projects/{project}/cacheConfig`. +func (r *ProjectsService) UpdateCacheConfig(name string, googlecloudaiplatformv1beta1cacheconfig *GoogleCloudAiplatformV1beta1CacheConfig) *ProjectsUpdateCacheConfigCall { + c := &ProjectsUpdateCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1cacheconfig = googlecloudaiplatformv1beta1cacheconfig + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsUpdateCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateCacheConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsUpdateCacheConfigCall) Context(ctx context.Context) *ProjectsUpdateCacheConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsUpdateCacheConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsUpdateCacheConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1cacheconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + 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 "aiplatform.projects.updateCacheConfig" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a cache config.", + // "flatPath": "v1beta1/projects/{projectsId}/cacheConfig", + // "httpMethod": "PATCH", + // "id": "aiplatform.projects.updateCacheConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Identifier. Name of the cache config. Format: - `projects/{project}/cacheConfig`.", + // "location": "path", + // "pattern": "^projects/[^/]+/cacheConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1CacheConfig" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.evaluateInstances": type ProjectsLocationsEvaluateInstancesCall struct { @@ -67553,6 +67956,151 @@ func (c *ProjectsLocationsEndpointsUndeployModelCall) Do(opts ...googleapi.CallO } +// method id "aiplatform.projects.locations.endpoints.chat.completions": + +type ProjectsLocationsEndpointsChatCompletionsCall struct { + s *Service + endpoint string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Completions: Exposes an OpenAI-compatible endpoint for chat +// completions. +// +// - endpoint: The name of the Endpoint requested to serve the +// prediction. Format: +// `projects/{project}/locations/{location}/endpoints/openapi`. +func (r *ProjectsLocationsEndpointsChatService) Completions(endpoint string, googleapihttpbody *GoogleApiHttpBody) *ProjectsLocationsEndpointsChatCompletionsCall { + c := &ProjectsLocationsEndpointsChatCompletionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googleapihttpbody = googleapihttpbody + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsChatCompletionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Context(ctx context.Context) *ProjectsLocationsEndpointsChatCompletionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsChatCompletionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}/chat/completions") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.chat.completions" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.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 *ProjectsLocationsEndpointsChatCompletionsCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, 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 := &GoogleApiHttpBody{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Exposes an OpenAI-compatible endpoint for chat completions.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}/chat/completions", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.endpoints.chat.completions", + // "parameterOrder": [ + // "endpoint" + // ], + // "parameters": { + // "endpoint": { + // "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/openapi`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+endpoint}/chat/completions", + // "request": { + // "$ref": "GoogleApiHttpBody" + // }, + // "response": { + // "$ref": "GoogleApiHttpBody" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.endpoints.operations.cancel": type ProjectsLocationsEndpointsOperationsCancelCall struct { diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index 427ab56b2d0..ea859da03d5 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -2089,8 +2089,10 @@ } }, "conversionEvents": { + "deprecated": true, "methods": { "create": { + "deprecated": true, "description": "Creates a conversion event with the specified attributes.", "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", "httpMethod": "POST", @@ -2119,6 +2121,7 @@ ] }, "delete": { + "deprecated": true, "description": "Deletes a conversion event in a property.", "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "DELETE", @@ -2144,6 +2147,7 @@ ] }, "get": { + "deprecated": true, "description": "Retrieve a single conversion event.", "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "GET", @@ -2170,6 +2174,7 @@ ] }, "list": { + "deprecated": true, "description": "Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", "httpMethod": "GET", @@ -2207,6 +2212,7 @@ ] }, "patch": { + "deprecated": true, "description": "Updates a conversion event with the specified attributes.", "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "PATCH", @@ -4026,6 +4032,160 @@ } } }, + "keyEvents": { + "methods": { + "create": { + "description": "Creates a Key Event.", + "flatPath": "v1alpha/properties/{propertiesId}/keyEvents", + "httpMethod": "POST", + "id": "analyticsadmin.properties.keyEvents.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the parent property where this Key Event will be created. Format: properties/123", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/keyEvents", + "request": { + "$ref": "GoogleAnalyticsAdminV1alphaKeyEvent" + }, + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaKeyEvent" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + }, + "delete": { + "description": "Deletes a Key Event.", + "flatPath": "v1alpha/properties/{propertiesId}/keyEvents/{keyEventsId}", + "httpMethod": "DELETE", + "id": "analyticsadmin.properties.keyEvents.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Key Event to delete. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\"", + "location": "path", + "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + }, + "get": { + "description": "Retrieve a single Key Event.", + "flatPath": "v1alpha/properties/{propertiesId}/keyEvents/{keyEventsId}", + "httpMethod": "GET", + "id": "analyticsadmin.properties.keyEvents.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Key Event to retrieve. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\"", + "location": "path", + "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaKeyEvent" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "list": { + "description": "Returns a list of Key Events in the specified parent property. Returns an empty list if no Key Events are found.", + "flatPath": "v1alpha/properties/{propertiesId}/keyEvents", + "httpMethod": "GET", + "id": "analyticsadmin.properties.keyEvents.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListKeyEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListKeyEvents` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent property. Example: 'properties/123'", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/keyEvents", + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaListKeyEventsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "patch": { + "description": "Updates a Key Event.", + "flatPath": "v1alpha/properties/{propertiesId}/keyEvents/{keyEventsId}", + "httpMethod": "PATCH", + "id": "analyticsadmin.properties.keyEvents.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{key_event}", + "location": "path", + "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleAnalyticsAdminV1alphaKeyEvent" + }, + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaKeyEvent" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + } + } + }, "rollupPropertySourceLinks": { "methods": { "create": { @@ -4457,7 +4617,7 @@ } } }, - "revision": "20240329", + "revision": "20240402", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { @@ -7115,6 +7275,72 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaKeyEvent": { + "description": "A key event in a Google Analytics property.", + "id": "GoogleAnalyticsAdminV1alphaKeyEvent", + "properties": { + "countingMethod": { + "description": "Required. The method by which Key Events will be counted across multiple events within a session.", + "enum": [ + "COUNTING_METHOD_UNSPECIFIED", + "ONCE_PER_EVENT", + "ONCE_PER_SESSION" + ], + "enumDescriptions": [ + "Counting method not specified.", + "Each Event instance is considered a Key Event.", + "An Event instance is considered a Key Event at most once per session per user." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. Time when this key event was created in the property.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "custom": { + "description": "Output only. If set to true, this key event refers to a custom event. If set to false, this key event refers to a default event in GA. Default events typically have special meaning in GA. Default events are usually created for you by the GA system, but in some cases can be created by property admins. Custom events count towards the maximum number of custom key events that may be created per property.", + "readOnly": true, + "type": "boolean" + }, + "defaultValue": { + "$ref": "GoogleAnalyticsAdminV1alphaKeyEventDefaultValue", + "description": "Optional. Defines a default value/currency for a key event." + }, + "deletable": { + "description": "Output only. If set to true, this event can be deleted.", + "readOnly": true, + "type": "boolean" + }, + "eventName": { + "description": "Immutable. The event name for this key event. Examples: 'click', 'purchase'", + "type": "string" + }, + "name": { + "description": "Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{key_event}", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1alphaKeyEventDefaultValue": { + "description": "Defines a default value/currency for a key event.", + "id": "GoogleAnalyticsAdminV1alphaKeyEventDefaultValue", + "properties": { + "currencyCode": { + "description": "Required. When an occurrence of this Key Event (specified by event_name) has no set currency this currency will be applied as the default. Must be in ISO 4217 currency code format. See https://en.wikipedia.org/wiki/ISO_4217 for more information.", + "type": "string" + }, + "numericValue": { + "description": "Required. This will be used to populate the \"value\" parameter for all occurrences of this Key Event (specified by event_name) where that parameter is unset.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails": { "description": "Status information for a link proposal.", "id": "GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails", @@ -7514,6 +7740,24 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaListKeyEventsResponse": { + "description": "Response message for ListKeyEvents RPC.", + "id": "GoogleAnalyticsAdminV1alphaListKeyEventsResponse", + "properties": { + "keyEvents": { + "description": "The requested Key Events", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaKeyEvent" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse": { "description": "Response message for ListMeasurementProtocolSecret RPC", "id": "GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse", diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index 9d51dd6426c..17e169cd437 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -224,6 +224,7 @@ func NewPropertiesService(s *Service) *PropertiesService { rs.ExpandedDataSets = NewPropertiesExpandedDataSetsService(s) rs.FirebaseLinks = NewPropertiesFirebaseLinksService(s) rs.GoogleAdsLinks = NewPropertiesGoogleAdsLinksService(s) + rs.KeyEvents = NewPropertiesKeyEventsService(s) rs.RollupPropertySourceLinks = NewPropertiesRollupPropertySourceLinksService(s) rs.SearchAds360Links = NewPropertiesSearchAds360LinksService(s) rs.SubpropertyEventFilters = NewPropertiesSubpropertyEventFiltersService(s) @@ -263,6 +264,8 @@ type PropertiesService struct { GoogleAdsLinks *PropertiesGoogleAdsLinksService + KeyEvents *PropertiesKeyEventsService + RollupPropertySourceLinks *PropertiesRollupPropertySourceLinksService SearchAds360Links *PropertiesSearchAds360LinksService @@ -441,6 +444,15 @@ type PropertiesGoogleAdsLinksService struct { s *Service } +func NewPropertiesKeyEventsService(s *Service) *PropertiesKeyEventsService { + rs := &PropertiesKeyEventsService{s: s} + return rs +} + +type PropertiesKeyEventsService struct { + s *Service +} + func NewPropertiesRollupPropertySourceLinksService(s *Service) *PropertiesRollupPropertySourceLinksService { rs := &PropertiesRollupPropertySourceLinksService{s: s} return rs @@ -5088,6 +5100,126 @@ func (s *GoogleAnalyticsAdminV1alphaGroupingRule) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaKeyEvent: A key event in a Google +// Analytics property. +type GoogleAnalyticsAdminV1alphaKeyEvent struct { + // CountingMethod: Required. The method by which Key Events will be + // counted across multiple events within a session. + // + // Possible values: + // "COUNTING_METHOD_UNSPECIFIED" - Counting method not specified. + // "ONCE_PER_EVENT" - Each Event instance is considered a Key Event. + // "ONCE_PER_SESSION" - An Event instance is considered a Key Event at + // most once per session per user. + CountingMethod string `json:"countingMethod,omitempty"` + + // CreateTime: Output only. Time when this key event was created in the + // property. + CreateTime string `json:"createTime,omitempty"` + + // Custom: Output only. If set to true, this key event refers to a + // custom event. If set to false, this key event refers to a default + // event in GA. Default events typically have special meaning in GA. + // Default events are usually created for you by the GA system, but in + // some cases can be created by property admins. Custom events count + // towards the maximum number of custom key events that may be created + // per property. + Custom bool `json:"custom,omitempty"` + + // DefaultValue: Optional. Defines a default value/currency for a key + // event. + DefaultValue *GoogleAnalyticsAdminV1alphaKeyEventDefaultValue `json:"defaultValue,omitempty"` + + // Deletable: Output only. If set to true, this event can be deleted. + Deletable bool `json:"deletable,omitempty"` + + // EventName: Immutable. The event name for this key event. Examples: + // 'click', 'purchase' + EventName string `json:"eventName,omitempty"` + + // Name: Output only. Resource name of this key event. Format: + // properties/{property}/keyEvents/{key_event} + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CountingMethod") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CountingMethod") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaKeyEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaKeyEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1alphaKeyEventDefaultValue: Defines a default +// value/currency for a key event. +type GoogleAnalyticsAdminV1alphaKeyEventDefaultValue struct { + // CurrencyCode: Required. When an occurrence of this Key Event + // (specified by event_name) has no set currency this currency will be + // applied as the default. Must be in ISO 4217 currency code format. See + // https://en.wikipedia.org/wiki/ISO_4217 for more information. + CurrencyCode string `json:"currencyCode,omitempty"` + + // NumericValue: Required. This will be used to populate the "value" + // parameter for all occurrences of this Key Event (specified by + // event_name) where that parameter is unset. + NumericValue float64 `json:"numericValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CurrencyCode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrencyCode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaKeyEventDefaultValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaKeyEventDefaultValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleAnalyticsAdminV1alphaKeyEventDefaultValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleAnalyticsAdminV1alphaKeyEventDefaultValue + var s1 struct { + NumericValue gensupport.JSONFloat64 `json:"numericValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.NumericValue = float64(s1.NumericValue) + return nil +} + // GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails: Status // information for a link proposal. type GoogleAnalyticsAdminV1alphaLinkProposalStatusDetails struct { @@ -5931,6 +6063,44 @@ func (s *GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse) MarshalJSON() ([ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaListKeyEventsResponse: Response message +// for ListKeyEvents RPC. +type GoogleAnalyticsAdminV1alphaListKeyEventsResponse struct { + // KeyEvents: The requested Key Events + KeyEvents []*GoogleAnalyticsAdminV1alphaKeyEvent `json:"keyEvents,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "KeyEvents") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KeyEvents") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaListKeyEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListKeyEventsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse: // Response message for ListMeasurementProtocolSecret RPC type GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse struct { @@ -18309,6 +18479,7 @@ func (c *PropertiesConversionEventsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { + // "deprecated": true, // "description": "Creates a conversion event with the specified attributes.", // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", // "httpMethod": "POST", @@ -18446,6 +18617,7 @@ func (c *PropertiesConversionEventsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { + // "deprecated": true, // "description": "Deletes a conversion event in a property.", // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", // "httpMethod": "DELETE", @@ -18596,6 +18768,7 @@ func (c *PropertiesConversionEventsGetCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { + // "deprecated": true, // "description": "Retrieve a single conversion event.", // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", // "httpMethod": "GET", @@ -18767,6 +18940,7 @@ func (c *PropertiesConversionEventsListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { + // "deprecated": true, // "description": "Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", // "httpMethod": "GET", @@ -18952,6 +19126,7 @@ func (c *PropertiesConversionEventsPatchCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { + // "deprecated": true, // "description": "Updates a conversion event with the specified attributes.", // "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", // "httpMethod": "PATCH", @@ -28184,6 +28359,796 @@ func (c *PropertiesGoogleAdsLinksPatchCall) Do(opts ...googleapi.CallOption) (*G } +// method id "analyticsadmin.properties.keyEvents.create": + +type PropertiesKeyEventsCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphakeyevent *GoogleAnalyticsAdminV1alphaKeyEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Key Event. +// +// - parent: The resource name of the parent property where this Key +// Event will be created. Format: properties/123. +func (r *PropertiesKeyEventsService) Create(parent string, googleanalyticsadminv1alphakeyevent *GoogleAnalyticsAdminV1alphaKeyEvent) *PropertiesKeyEventsCreateCall { + c := &PropertiesKeyEventsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphakeyevent = googleanalyticsadminv1alphakeyevent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesKeyEventsCreateCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesKeyEventsCreateCall) Context(ctx context.Context) *PropertiesKeyEventsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesKeyEventsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesKeyEventsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphakeyevent) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/keyEvents") + 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 "analyticsadmin.properties.keyEvents.create" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaKeyEvent or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaKeyEvent.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 *PropertiesKeyEventsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaKeyEvent, 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 := &GoogleAnalyticsAdminV1alphaKeyEvent{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Key Event.", + // "flatPath": "v1alpha/properties/{propertiesId}/keyEvents", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.keyEvents.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the parent property where this Key Event will be created. Format: properties/123", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/keyEvents", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaKeyEvent" + // }, + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaKeyEvent" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit" + // ] + // } + +} + +// method id "analyticsadmin.properties.keyEvents.delete": + +type PropertiesKeyEventsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Key Event. +// +// - name: The resource name of the Key Event to delete. Format: +// properties/{property}/keyEvents/{key_event} Example: +// "properties/123/keyEvents/456". +func (r *PropertiesKeyEventsService) Delete(name string) *PropertiesKeyEventsDeleteCall { + c := &PropertiesKeyEventsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesKeyEventsDeleteCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesKeyEventsDeleteCall) Context(ctx context.Context) *PropertiesKeyEventsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesKeyEventsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesKeyEventsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "analyticsadmin.properties.keyEvents.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *PropertiesKeyEventsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Key Event.", + // "flatPath": "v1alpha/properties/{propertiesId}/keyEvents/{keyEventsId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.keyEvents.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Key Event to delete. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\"", + // "location": "path", + // "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit" + // ] + // } + +} + +// method id "analyticsadmin.properties.keyEvents.get": + +type PropertiesKeyEventsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve a single Key Event. +// +// - name: The resource name of the Key Event to retrieve. Format: +// properties/{property}/keyEvents/{key_event} Example: +// "properties/123/keyEvents/456". +func (r *PropertiesKeyEventsService) Get(name string) *PropertiesKeyEventsGetCall { + c := &PropertiesKeyEventsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesKeyEventsGetCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesKeyEventsGetCall) IfNoneMatch(entityTag string) *PropertiesKeyEventsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesKeyEventsGetCall) Context(ctx context.Context) *PropertiesKeyEventsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesKeyEventsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesKeyEventsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "analyticsadmin.properties.keyEvents.get" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaKeyEvent or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaKeyEvent.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 *PropertiesKeyEventsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaKeyEvent, 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 := &GoogleAnalyticsAdminV1alphaKeyEvent{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve a single Key Event.", + // "flatPath": "v1alpha/properties/{propertiesId}/keyEvents/{keyEventsId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.keyEvents.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Key Event to retrieve. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\"", + // "location": "path", + // "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaKeyEvent" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + +// method id "analyticsadmin.properties.keyEvents.list": + +type PropertiesKeyEventsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns a list of Key Events in the specified parent property. +// Returns an empty list if no Key Events are found. +// +// - parent: The resource name of the parent property. Example: +// 'properties/123'. +func (r *PropertiesKeyEventsService) List(parent string) *PropertiesKeyEventsListCall { + c := &PropertiesKeyEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of resources to return. If unspecified, at most 50 resources will be +// returned. The maximum value is 200; (higher values will be coerced to +// the maximum) +func (c *PropertiesKeyEventsListCall) PageSize(pageSize int64) *PropertiesKeyEventsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListKeyEvents` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListKeyEvents` must match the call that provided the +// page token. +func (c *PropertiesKeyEventsListCall) PageToken(pageToken string) *PropertiesKeyEventsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesKeyEventsListCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesKeyEventsListCall) IfNoneMatch(entityTag string) *PropertiesKeyEventsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesKeyEventsListCall) Context(ctx context.Context) *PropertiesKeyEventsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesKeyEventsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesKeyEventsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/keyEvents") + 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 "analyticsadmin.properties.keyEvents.list" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaListKeyEventsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaListKeyEventsResponse.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 *PropertiesKeyEventsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListKeyEventsResponse, 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 := &GoogleAnalyticsAdminV1alphaListKeyEventsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a list of Key Events in the specified parent property. Returns an empty list if no Key Events are found.", + // "flatPath": "v1alpha/properties/{propertiesId}/keyEvents", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.keyEvents.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListKeyEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListKeyEvents` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent property. Example: 'properties/123'", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/keyEvents", + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaListKeyEventsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + +// 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 *PropertiesKeyEventsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListKeyEventsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "analyticsadmin.properties.keyEvents.patch": + +type PropertiesKeyEventsPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphakeyevent *GoogleAnalyticsAdminV1alphaKeyEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Key Event. +// +// - name: Output only. Resource name of this key event. Format: +// properties/{property}/keyEvents/{key_event}. +func (r *PropertiesKeyEventsService) Patch(name string, googleanalyticsadminv1alphakeyevent *GoogleAnalyticsAdminV1alphaKeyEvent) *PropertiesKeyEventsPatchCall { + c := &PropertiesKeyEventsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphakeyevent = googleanalyticsadminv1alphakeyevent + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. Field names must be in snake case +// (e.g., "field_to_update"). Omitted fields will not be updated. To +// replace the entire entity, use one path with the string "*" to match +// all fields. +func (c *PropertiesKeyEventsPatchCall) UpdateMask(updateMask string) *PropertiesKeyEventsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesKeyEventsPatchCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesKeyEventsPatchCall) Context(ctx context.Context) *PropertiesKeyEventsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesKeyEventsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesKeyEventsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphakeyevent) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "analyticsadmin.properties.keyEvents.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1alphaKeyEvent or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1alphaKeyEvent.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 *PropertiesKeyEventsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaKeyEvent, 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 := &GoogleAnalyticsAdminV1alphaKeyEvent{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Key Event.", + // "flatPath": "v1alpha/properties/{propertiesId}/keyEvents/{keyEventsId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.keyEvents.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{key_event}", + // "location": "path", + // "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaKeyEvent" + // }, + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaKeyEvent" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit" + // ] + // } + +} + // method id "analyticsadmin.properties.rollupPropertySourceLinks.create": type PropertiesRollupPropertySourceLinksCreateCall struct { diff --git a/analyticsadmin/v1beta/analyticsadmin-api.json b/analyticsadmin/v1beta/analyticsadmin-api.json index 5c32985056a..1aabeb7a321 100644 --- a/analyticsadmin/v1beta/analyticsadmin-api.json +++ b/analyticsadmin/v1beta/analyticsadmin-api.json @@ -626,8 +626,10 @@ }, "resources": { "conversionEvents": { + "deprecated": true, "methods": { "create": { + "deprecated": true, "description": "Creates a conversion event with the specified attributes.", "flatPath": "v1beta/properties/{propertiesId}/conversionEvents", "httpMethod": "POST", @@ -656,6 +658,7 @@ ] }, "delete": { + "deprecated": true, "description": "Deletes a conversion event in a property.", "flatPath": "v1beta/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "DELETE", @@ -681,6 +684,7 @@ ] }, "get": { + "deprecated": true, "description": "Retrieve a single conversion event.", "flatPath": "v1beta/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "GET", @@ -707,6 +711,7 @@ ] }, "list": { + "deprecated": true, "description": "Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", "flatPath": "v1beta/properties/{propertiesId}/conversionEvents", "httpMethod": "GET", @@ -744,6 +749,7 @@ ] }, "patch": { + "deprecated": true, "description": "Updates a conversion event with the specified attributes.", "flatPath": "v1beta/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "PATCH", @@ -1624,11 +1630,165 @@ ] } } + }, + "keyEvents": { + "methods": { + "create": { + "description": "Creates a Key Event.", + "flatPath": "v1beta/properties/{propertiesId}/keyEvents", + "httpMethod": "POST", + "id": "analyticsadmin.properties.keyEvents.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the parent property where this Key Event will be created. Format: properties/123", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/keyEvents", + "request": { + "$ref": "GoogleAnalyticsAdminV1betaKeyEvent" + }, + "response": { + "$ref": "GoogleAnalyticsAdminV1betaKeyEvent" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + }, + "delete": { + "description": "Deletes a Key Event.", + "flatPath": "v1beta/properties/{propertiesId}/keyEvents/{keyEventsId}", + "httpMethod": "DELETE", + "id": "analyticsadmin.properties.keyEvents.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Key Event to delete. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\"", + "location": "path", + "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + }, + "get": { + "description": "Retrieve a single Key Event.", + "flatPath": "v1beta/properties/{propertiesId}/keyEvents/{keyEventsId}", + "httpMethod": "GET", + "id": "analyticsadmin.properties.keyEvents.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Key Event to retrieve. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\"", + "location": "path", + "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleAnalyticsAdminV1betaKeyEvent" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "list": { + "description": "Returns a list of Key Events in the specified parent property. Returns an empty list if no Key Events are found.", + "flatPath": "v1beta/properties/{propertiesId}/keyEvents", + "httpMethod": "GET", + "id": "analyticsadmin.properties.keyEvents.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListKeyEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListKeyEvents` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent property. Example: 'properties/123'", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/keyEvents", + "response": { + "$ref": "GoogleAnalyticsAdminV1betaListKeyEventsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "patch": { + "description": "Updates a Key Event.", + "flatPath": "v1beta/properties/{propertiesId}/keyEvents/{keyEventsId}", + "httpMethod": "PATCH", + "id": "analyticsadmin.properties.keyEvents.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{key_event}", + "location": "path", + "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "GoogleAnalyticsAdminV1betaKeyEvent" + }, + "response": { + "$ref": "GoogleAnalyticsAdminV1betaKeyEvent" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + } + } } } } }, - "revision": "20240329", + "revision": "20240402", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1betaAccessBetweenFilter": { @@ -2651,6 +2811,72 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1betaKeyEvent": { + "description": "A key event in a Google Analytics property.", + "id": "GoogleAnalyticsAdminV1betaKeyEvent", + "properties": { + "countingMethod": { + "description": "Required. The method by which Key Events will be counted across multiple events within a session.", + "enum": [ + "COUNTING_METHOD_UNSPECIFIED", + "ONCE_PER_EVENT", + "ONCE_PER_SESSION" + ], + "enumDescriptions": [ + "Counting method not specified.", + "Each Event instance is considered a Key Event.", + "An Event instance is considered a Key Event at most once per session per user." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. Time when this key event was created in the property.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "custom": { + "description": "Output only. If set to true, this key event refers to a custom event. If set to false, this key event refers to a default event in GA. Default events typically have special meaning in GA. Default events are usually created for you by the GA system, but in some cases can be created by property admins. Custom events count towards the maximum number of custom key events that may be created per property.", + "readOnly": true, + "type": "boolean" + }, + "defaultValue": { + "$ref": "GoogleAnalyticsAdminV1betaKeyEventDefaultValue", + "description": "Optional. Defines a default value/currency for a key event." + }, + "deletable": { + "description": "Output only. If set to true, this event can be deleted.", + "readOnly": true, + "type": "boolean" + }, + "eventName": { + "description": "Immutable. The event name for this key event. Examples: 'click', 'purchase'", + "type": "string" + }, + "name": { + "description": "Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{key_event}", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleAnalyticsAdminV1betaKeyEventDefaultValue": { + "description": "Defines a default value/currency for a key event.", + "id": "GoogleAnalyticsAdminV1betaKeyEventDefaultValue", + "properties": { + "currencyCode": { + "description": "Required. When an occurrence of this Key Event (specified by event_name) has no set currency this currency will be applied as the default. Must be in ISO 4217 currency code format. See https://en.wikipedia.org/wiki/ISO_4217 for more information.", + "type": "string" + }, + "numericValue": { + "description": "Required. This will be used to populate the \"value\" parameter for all occurrences of this Key Event (specified by event_name) where that parameter is unset.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1betaListAccountSummariesResponse": { "description": "Response message for ListAccountSummaries RPC.", "id": "GoogleAnalyticsAdminV1betaListAccountSummariesResponse", @@ -2795,6 +3021,24 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1betaListKeyEventsResponse": { + "description": "Response message for ListKeyEvents RPC.", + "id": "GoogleAnalyticsAdminV1betaListKeyEventsResponse", + "properties": { + "keyEvents": { + "description": "The requested Key Events", + "items": { + "$ref": "GoogleAnalyticsAdminV1betaKeyEvent" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse": { "description": "Response message for ListMeasurementProtocolSecret RPC", "id": "GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse", diff --git a/analyticsadmin/v1beta/analyticsadmin-gen.go b/analyticsadmin/v1beta/analyticsadmin-gen.go index 7409f1c1849..3c3b3c0feaa 100644 --- a/analyticsadmin/v1beta/analyticsadmin-gen.go +++ b/analyticsadmin/v1beta/analyticsadmin-gen.go @@ -195,6 +195,7 @@ func NewPropertiesService(s *Service) *PropertiesService { rs.DataStreams = NewPropertiesDataStreamsService(s) rs.FirebaseLinks = NewPropertiesFirebaseLinksService(s) rs.GoogleAdsLinks = NewPropertiesGoogleAdsLinksService(s) + rs.KeyEvents = NewPropertiesKeyEventsService(s) return rs } @@ -212,6 +213,8 @@ type PropertiesService struct { FirebaseLinks *PropertiesFirebaseLinksService GoogleAdsLinks *PropertiesGoogleAdsLinksService + + KeyEvents *PropertiesKeyEventsService } func NewPropertiesConversionEventsService(s *Service) *PropertiesConversionEventsService { @@ -280,6 +283,15 @@ type PropertiesGoogleAdsLinksService struct { s *Service } +func NewPropertiesKeyEventsService(s *Service) *PropertiesKeyEventsService { + rs := &PropertiesKeyEventsService{s: s} + return rs +} + +type PropertiesKeyEventsService struct { + s *Service +} + // GoogleAnalyticsAdminV1betaAccessBetweenFilter: To express that the // result needs to be between two numbers (inclusive). type GoogleAnalyticsAdminV1betaAccessBetweenFilter struct { @@ -2000,6 +2012,126 @@ func (s *GoogleAnalyticsAdminV1betaGoogleAdsLink) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1betaKeyEvent: A key event in a Google Analytics +// property. +type GoogleAnalyticsAdminV1betaKeyEvent struct { + // CountingMethod: Required. The method by which Key Events will be + // counted across multiple events within a session. + // + // Possible values: + // "COUNTING_METHOD_UNSPECIFIED" - Counting method not specified. + // "ONCE_PER_EVENT" - Each Event instance is considered a Key Event. + // "ONCE_PER_SESSION" - An Event instance is considered a Key Event at + // most once per session per user. + CountingMethod string `json:"countingMethod,omitempty"` + + // CreateTime: Output only. Time when this key event was created in the + // property. + CreateTime string `json:"createTime,omitempty"` + + // Custom: Output only. If set to true, this key event refers to a + // custom event. If set to false, this key event refers to a default + // event in GA. Default events typically have special meaning in GA. + // Default events are usually created for you by the GA system, but in + // some cases can be created by property admins. Custom events count + // towards the maximum number of custom key events that may be created + // per property. + Custom bool `json:"custom,omitempty"` + + // DefaultValue: Optional. Defines a default value/currency for a key + // event. + DefaultValue *GoogleAnalyticsAdminV1betaKeyEventDefaultValue `json:"defaultValue,omitempty"` + + // Deletable: Output only. If set to true, this event can be deleted. + Deletable bool `json:"deletable,omitempty"` + + // EventName: Immutable. The event name for this key event. Examples: + // 'click', 'purchase' + EventName string `json:"eventName,omitempty"` + + // Name: Output only. Resource name of this key event. Format: + // properties/{property}/keyEvents/{key_event} + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CountingMethod") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CountingMethod") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1betaKeyEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1betaKeyEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAnalyticsAdminV1betaKeyEventDefaultValue: Defines a default +// value/currency for a key event. +type GoogleAnalyticsAdminV1betaKeyEventDefaultValue struct { + // CurrencyCode: Required. When an occurrence of this Key Event + // (specified by event_name) has no set currency this currency will be + // applied as the default. Must be in ISO 4217 currency code format. See + // https://en.wikipedia.org/wiki/ISO_4217 for more information. + CurrencyCode string `json:"currencyCode,omitempty"` + + // NumericValue: Required. This will be used to populate the "value" + // parameter for all occurrences of this Key Event (specified by + // event_name) where that parameter is unset. + NumericValue float64 `json:"numericValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CurrencyCode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrencyCode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1betaKeyEventDefaultValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1betaKeyEventDefaultValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleAnalyticsAdminV1betaKeyEventDefaultValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleAnalyticsAdminV1betaKeyEventDefaultValue + var s1 struct { + NumericValue gensupport.JSONFloat64 `json:"numericValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.NumericValue = float64(s1.NumericValue) + return nil +} + // GoogleAnalyticsAdminV1betaListAccountSummariesResponse: Response // message for ListAccountSummaries RPC. type GoogleAnalyticsAdminV1betaListAccountSummariesResponse struct { @@ -2311,6 +2443,44 @@ func (s *GoogleAnalyticsAdminV1betaListGoogleAdsLinksResponse) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1betaListKeyEventsResponse: Response message for +// ListKeyEvents RPC. +type GoogleAnalyticsAdminV1betaListKeyEventsResponse struct { + // KeyEvents: The requested Key Events + KeyEvents []*GoogleAnalyticsAdminV1betaKeyEvent `json:"keyEvents,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "KeyEvents") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KeyEvents") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1betaListKeyEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1betaListKeyEventsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse: // Response message for ListMeasurementProtocolSecret RPC type GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse struct { @@ -6033,6 +6203,7 @@ func (c *PropertiesConversionEventsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { + // "deprecated": true, // "description": "Creates a conversion event with the specified attributes.", // "flatPath": "v1beta/properties/{propertiesId}/conversionEvents", // "httpMethod": "POST", @@ -6170,6 +6341,7 @@ func (c *PropertiesConversionEventsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { + // "deprecated": true, // "description": "Deletes a conversion event in a property.", // "flatPath": "v1beta/properties/{propertiesId}/conversionEvents/{conversionEventsId}", // "httpMethod": "DELETE", @@ -6320,6 +6492,7 @@ func (c *PropertiesConversionEventsGetCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { + // "deprecated": true, // "description": "Retrieve a single conversion event.", // "flatPath": "v1beta/properties/{propertiesId}/conversionEvents/{conversionEventsId}", // "httpMethod": "GET", @@ -6491,6 +6664,7 @@ func (c *PropertiesConversionEventsListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { + // "deprecated": true, // "description": "Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", // "flatPath": "v1beta/properties/{propertiesId}/conversionEvents", // "httpMethod": "GET", @@ -6676,6 +6850,7 @@ func (c *PropertiesConversionEventsPatchCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { + // "deprecated": true, // "description": "Updates a conversion event with the specified attributes.", // "flatPath": "v1beta/properties/{propertiesId}/conversionEvents/{conversionEventsId}", // "httpMethod": "PATCH", @@ -10999,3 +11174,795 @@ func (c *PropertiesGoogleAdsLinksPatchCall) Do(opts ...googleapi.CallOption) (*G // } } + +// method id "analyticsadmin.properties.keyEvents.create": + +type PropertiesKeyEventsCreateCall struct { + s *Service + parent string + googleanalyticsadminv1betakeyevent *GoogleAnalyticsAdminV1betaKeyEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Key Event. +// +// - parent: The resource name of the parent property where this Key +// Event will be created. Format: properties/123. +func (r *PropertiesKeyEventsService) Create(parent string, googleanalyticsadminv1betakeyevent *GoogleAnalyticsAdminV1betaKeyEvent) *PropertiesKeyEventsCreateCall { + c := &PropertiesKeyEventsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1betakeyevent = googleanalyticsadminv1betakeyevent + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesKeyEventsCreateCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesKeyEventsCreateCall) Context(ctx context.Context) *PropertiesKeyEventsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesKeyEventsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesKeyEventsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betakeyevent) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/keyEvents") + 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 "analyticsadmin.properties.keyEvents.create" call. +// Exactly one of *GoogleAnalyticsAdminV1betaKeyEvent or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1betaKeyEvent.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 *PropertiesKeyEventsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaKeyEvent, 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 := &GoogleAnalyticsAdminV1betaKeyEvent{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Key Event.", + // "flatPath": "v1beta/properties/{propertiesId}/keyEvents", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.keyEvents.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the parent property where this Key Event will be created. Format: properties/123", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/keyEvents", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1betaKeyEvent" + // }, + // "response": { + // "$ref": "GoogleAnalyticsAdminV1betaKeyEvent" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit" + // ] + // } + +} + +// method id "analyticsadmin.properties.keyEvents.delete": + +type PropertiesKeyEventsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Key Event. +// +// - name: The resource name of the Key Event to delete. Format: +// properties/{property}/keyEvents/{key_event} Example: +// "properties/123/keyEvents/456". +func (r *PropertiesKeyEventsService) Delete(name string) *PropertiesKeyEventsDeleteCall { + c := &PropertiesKeyEventsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesKeyEventsDeleteCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesKeyEventsDeleteCall) Context(ctx context.Context) *PropertiesKeyEventsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesKeyEventsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesKeyEventsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "analyticsadmin.properties.keyEvents.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *PropertiesKeyEventsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Key Event.", + // "flatPath": "v1beta/properties/{propertiesId}/keyEvents/{keyEventsId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.keyEvents.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Key Event to delete. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\"", + // "location": "path", + // "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit" + // ] + // } + +} + +// method id "analyticsadmin.properties.keyEvents.get": + +type PropertiesKeyEventsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieve a single Key Event. +// +// - name: The resource name of the Key Event to retrieve. Format: +// properties/{property}/keyEvents/{key_event} Example: +// "properties/123/keyEvents/456". +func (r *PropertiesKeyEventsService) Get(name string) *PropertiesKeyEventsGetCall { + c := &PropertiesKeyEventsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesKeyEventsGetCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesKeyEventsGetCall) IfNoneMatch(entityTag string) *PropertiesKeyEventsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesKeyEventsGetCall) Context(ctx context.Context) *PropertiesKeyEventsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesKeyEventsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesKeyEventsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "analyticsadmin.properties.keyEvents.get" call. +// Exactly one of *GoogleAnalyticsAdminV1betaKeyEvent or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1betaKeyEvent.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 *PropertiesKeyEventsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaKeyEvent, 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 := &GoogleAnalyticsAdminV1betaKeyEvent{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve a single Key Event.", + // "flatPath": "v1beta/properties/{propertiesId}/keyEvents/{keyEventsId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.keyEvents.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Key Event to retrieve. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\"", + // "location": "path", + // "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleAnalyticsAdminV1betaKeyEvent" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + +// method id "analyticsadmin.properties.keyEvents.list": + +type PropertiesKeyEventsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns a list of Key Events in the specified parent property. +// Returns an empty list if no Key Events are found. +// +// - parent: The resource name of the parent property. Example: +// 'properties/123'. +func (r *PropertiesKeyEventsService) List(parent string) *PropertiesKeyEventsListCall { + c := &PropertiesKeyEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of resources to return. If unspecified, at most 50 resources will be +// returned. The maximum value is 200; (higher values will be coerced to +// the maximum) +func (c *PropertiesKeyEventsListCall) PageSize(pageSize int64) *PropertiesKeyEventsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListKeyEvents` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListKeyEvents` must match the call that provided the +// page token. +func (c *PropertiesKeyEventsListCall) PageToken(pageToken string) *PropertiesKeyEventsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesKeyEventsListCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesKeyEventsListCall) IfNoneMatch(entityTag string) *PropertiesKeyEventsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesKeyEventsListCall) Context(ctx context.Context) *PropertiesKeyEventsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesKeyEventsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesKeyEventsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/keyEvents") + 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 "analyticsadmin.properties.keyEvents.list" call. +// Exactly one of *GoogleAnalyticsAdminV1betaListKeyEventsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1betaListKeyEventsResponse.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 *PropertiesKeyEventsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListKeyEventsResponse, 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 := &GoogleAnalyticsAdminV1betaListKeyEventsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a list of Key Events in the specified parent property. Returns an empty list if no Key Events are found.", + // "flatPath": "v1beta/properties/{propertiesId}/keyEvents", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.keyEvents.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListKeyEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListKeyEvents` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent property. Example: 'properties/123'", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/keyEvents", + // "response": { + // "$ref": "GoogleAnalyticsAdminV1betaListKeyEventsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + +// 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 *PropertiesKeyEventsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListKeyEventsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "analyticsadmin.properties.keyEvents.patch": + +type PropertiesKeyEventsPatchCall struct { + s *Service + name string + googleanalyticsadminv1betakeyevent *GoogleAnalyticsAdminV1betaKeyEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Key Event. +// +// - name: Output only. Resource name of this key event. Format: +// properties/{property}/keyEvents/{key_event}. +func (r *PropertiesKeyEventsService) Patch(name string, googleanalyticsadminv1betakeyevent *GoogleAnalyticsAdminV1betaKeyEvent) *PropertiesKeyEventsPatchCall { + c := &PropertiesKeyEventsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1betakeyevent = googleanalyticsadminv1betakeyevent + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. Field names must be in snake case +// (e.g., "field_to_update"). Omitted fields will not be updated. To +// replace the entire entity, use one path with the string "*" to match +// all fields. +func (c *PropertiesKeyEventsPatchCall) UpdateMask(updateMask string) *PropertiesKeyEventsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesKeyEventsPatchCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesKeyEventsPatchCall) Context(ctx context.Context) *PropertiesKeyEventsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesKeyEventsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesKeyEventsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betakeyevent) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "analyticsadmin.properties.keyEvents.patch" call. +// Exactly one of *GoogleAnalyticsAdminV1betaKeyEvent or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleAnalyticsAdminV1betaKeyEvent.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 *PropertiesKeyEventsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaKeyEvent, 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 := &GoogleAnalyticsAdminV1betaKeyEvent{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Key Event.", + // "flatPath": "v1beta/properties/{propertiesId}/keyEvents/{keyEventsId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.keyEvents.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{key_event}", + // "location": "path", + // "pattern": "^properties/[^/]+/keyEvents/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1betaKeyEvent" + // }, + // "response": { + // "$ref": "GoogleAnalyticsAdminV1betaKeyEvent" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit" + // ] + // } + +} diff --git a/calendar/v3/calendar-api.json b/calendar/v3/calendar-api.json index b1141ef3490..454c8aa9277 100644 --- a/calendar/v3/calendar-api.json +++ b/calendar/v3/calendar-api.json @@ -1088,7 +1088,7 @@ "type": "string" }, "eventTypes": { - "description": "Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. The default is [\"default\", \"focusTime\", \"outOfOffice\"].", + "description": "Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. If unset, returns all event types.", "enum": [ "default", "focusTime", @@ -1503,7 +1503,7 @@ "type": "string" }, "eventTypes": { - "description": "Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. The default is [\"default\", \"focusTime\", \"outOfOffice\"].", + "description": "Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. If unset, returns all event types.", "enum": [ "default", "focusTime", @@ -1759,7 +1759,7 @@ } } }, - "revision": "20240111", + "revision": "20240328", "rootUrl": "https://www.googleapis.com/", "schemas": { "Acl": { diff --git a/calendar/v3/calendar-gen.go b/calendar/v3/calendar-gen.go index 58270d75c54..81bf8c77614 100644 --- a/calendar/v3/calendar-gen.go +++ b/calendar/v3/calendar-gen.go @@ -7184,8 +7184,7 @@ func (c *EventsListCall) AlwaysIncludeEmail(alwaysIncludeEmail bool) *EventsList // EventTypes sets the optional parameter "eventTypes": Event types to // return. This parameter can be repeated multiple times to return -// events of different types. The default is ["default", "focusTime", -// "outOfOffice"]. +// events of different types. If unset, returns all event types. // // Possible values: // @@ -7511,7 +7510,7 @@ func (c *EventsListCall) Do(opts ...googleapi.CallOption) (*Events, error) { // "type": "string" // }, // "eventTypes": { - // "description": "Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. The default is [\"default\", \"focusTime\", \"outOfOffice\"].", + // "description": "Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. If unset, returns all event types.", // "enum": [ // "default", // "focusTime", @@ -8631,8 +8630,7 @@ func (c *EventsWatchCall) AlwaysIncludeEmail(alwaysIncludeEmail bool) *EventsWat // EventTypes sets the optional parameter "eventTypes": Event types to // return. This parameter can be repeated multiple times to return -// events of different types. The default is ["default", "focusTime", -// "outOfOffice"]. +// events of different types. If unset, returns all event types. // // Possible values: // @@ -8950,7 +8948,7 @@ func (c *EventsWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // "type": "string" // }, // "eventTypes": { - // "description": "Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. The default is [\"default\", \"focusTime\", \"outOfOffice\"].", + // "description": "Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. If unset, returns all event types.", // "enum": [ // "default", // "focusTime", diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index d2dd992840b..f729453c1ef 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -990,7 +990,7 @@ "spaceEvents": { "methods": { "get": { - "description": "Returns a SpaceEvent. You can request events from up to 28 days before the time of the request. The server will return the most recent version of the resource. For example, if a `google.workspace.chat.message.v1.created` event is requested and the message has since been deleted, the returned event will contain the deleted message resource in the payload. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", + "description": "Returns an event from a Google Chat space. The [event payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated `Message` resource in the event payload. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). To get an event, the authenticated user must be a member of the space. For an example, see [Get details about an event from a Google Chat space](https://developers.google.com/workspace/chat/get-space-event).", "flatPath": "v1/spaces/{spacesId}/spaceEvents/{spaceEventsId}", "httpMethod": "GET", "id": "chat.spaces.spaceEvents.get", @@ -999,7 +999,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`", + "description": "Required. The resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`", "location": "path", "pattern": "^spaces/[^/]+/spaceEvents/[^/]+$", "required": true, @@ -1022,7 +1022,7 @@ ] }, "list": { - "description": "Lists SpaceEvents in a space that the caller is a member of. You can request events from up to 28 days before the time of the request. The server will return the most recent version of the resources. For example, if a `google.workspace.chat.message.v1.created` event is requested and the message has since been deleted, the returned event will contain the deleted message resource in the payload. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", + "description": "Lists events from a Google Chat space. For each event, the [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns `Membership` resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty `Membership` resource. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). To list events, the authenticated user must be a member of the space. For an example, see [List events from a Google Chat space](https://developers.google.com/workspace/chat/list-space-events).", "flatPath": "v1/spaces/{spacesId}/spaceEvents", "httpMethod": "GET", "id": "chat.spaces.spaceEvents.list", @@ -1031,12 +1031,12 @@ ], "parameters": { "filter": { - "description": "Required. A query filter. This method supports filtering by: `event_types`, `start_time`, and `end_time`. `event_types`: You must specify at least one event type in your query. `event_types` supports the has `:` operator. To filter by multiple event types, use the `OR` operator. To see the list of currently supported event types, see google.chat.v1.SpaceEvent.event_type `start_time`: Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the 28 days ago up to end time. `end_time`: Inclusive timestamp up to which space events are listed. Default value is the present. `start_time` and `end_time` accept a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and support the equals `=` comparison operator. To filter by both `start_time` and `end_time`, use the `AND` operator. For example, the following queries are valid: ``` start_time=\"2023-08-23T19:20:33+00:00\" AND end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` start_time=\"2023-08-23T19:20:33+00:00\" AND (event_types:\"google.workspace.chat.space.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\") ``` The following queries are invalid: ``` start_time=\"2023-08-23T19:20:33+00:00\" OR end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` event_types:\"google.workspace.chat.space.v1.updated\" AND event_types:\"google.workspace.chat.message.v1.created\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", + "description": "Required. A query filter. You must specify at least one event type (`event_type`) using the has `:` operator. To filter by multiple event types, use the `OR` operator. Omit batch event types in your filter. The request automatically returns any related batch events. For example, if you filter by new reactions (`google.workspace.chat.reaction.v1.created`), the server also returns batch new reactions events (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported event types, see the [`SpaceEvents` reference documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). Optionally, you can also filter by start time (`start_time`) and end time (`end_time`): * `start_time`: Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the past 28 days. * `end_time`: Inclusive timestamp until which space events are listed. If unspecified, lists events up to the time of the request. To specify a start or end time, use the equals `=` operator and format in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both `start_time` and `end_time`, use the `AND` operator. For example, the following queries are valid: ``` start_time=\"2023-08-23T19:20:33+00:00\" AND end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` start_time=\"2023-08-23T19:20:33+00:00\" AND (event_types:\"google.workspace.chat.space.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\") ``` The following queries are invalid: ``` start_time=\"2023-08-23T19:20:33+00:00\" OR end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` event_types:\"google.workspace.chat.space.v1.updated\" AND event_types:\"google.workspace.chat.message.v1.created\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", "location": "query", "type": "string" }, "pageSize": { - "description": "Optional. The maximum number of space events returned. The service may return fewer than this value. Negative values return an `INVALID_ARGUMENT` error.", + "description": "Optional. The maximum number of space events returned. The service might return fewer than this value. Negative values return an `INVALID_ARGUMENT` error.", "format": "int32", "location": "query", "type": "integer" @@ -1047,7 +1047,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the space from which to list events. Format: `spaces/{space}`.", + "description": "Required. Resource name of the [Google Chat space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) where the events occurred. Format: `spaces/{space}`.", "location": "path", "pattern": "^spaces/[^/]+$", "required": true, @@ -1074,7 +1074,7 @@ } } }, - "revision": "20240326", + "revision": "20240331", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessoryWidget": { @@ -3330,11 +3330,11 @@ "type": "object" }, "MembershipBatchCreatedEventData": { - "description": "Payload for batch new membership events where the `EventType` field is `google.workspace.chat.membership.v1.batchCreated`.", + "description": "Event payload for multiple new memberships. Event type: `google.workspace.chat.membership.v1.batchCreated`", "id": "MembershipBatchCreatedEventData", "properties": { "memberships": { - "description": "A list of created memberships.", + "description": "A list of new memberships.", "items": { "$ref": "MembershipCreatedEventData" }, @@ -3344,7 +3344,7 @@ "type": "object" }, "MembershipBatchDeletedEventData": { - "description": "Payload for batch deleted membership events where the `EventType` field is `google.workspace.chat.membership.v1.batchDeleted`.", + "description": "Event payload for multiple deleted memberships. Event type: `google.workspace.chat.membership.v1.batchDeleted`", "id": "MembershipBatchDeletedEventData", "properties": { "memberships": { @@ -3358,7 +3358,7 @@ "type": "object" }, "MembershipBatchUpdatedEventData": { - "description": "Payload for batch updated membership events where the `EventType` field is `google.workspace.chat.membership.v1.batchUpdated`.", + "description": "Event payload for multiple updated memberships. Event type: `google.workspace.chat.membership.v1.batchUpdated`", "id": "MembershipBatchUpdatedEventData", "properties": { "memberships": { @@ -3372,34 +3372,34 @@ "type": "object" }, "MembershipCreatedEventData": { - "description": "Payload for new membership events where the `EventType` field is `google.workspace.chat.membership.v1.created`.", + "description": "Event payload for a new membership. Event type: `google.workspace.chat.membership.v1.created`.", "id": "MembershipCreatedEventData", "properties": { "membership": { "$ref": "Membership", - "description": "The most recent version of membership." + "description": "The new membership." } }, "type": "object" }, "MembershipDeletedEventData": { - "description": "Payload for deleted membership events where the `EventType` field is `google.workspace.chat.membership.v1.deleted`.", + "description": "Event payload for a deleted membership. Event type: `google.workspace.chat.membership.v1.deleted`", "id": "MembershipDeletedEventData", "properties": { "membership": { "$ref": "Membership", - "description": "The deleted membership. Only `name` and `state` are populated." + "description": "The deleted membership. Only the `name` and `state` fields are populated." } }, "type": "object" }, "MembershipUpdatedEventData": { - "description": "Payload for updated membership events where the `EventType` field is `google.workspace.chat.membership.v1.updated`.", + "description": "Event payload for an updated membership. Event type: `google.workspace.chat.membership.v1.updated`", "id": "MembershipUpdatedEventData", "properties": { "membership": { "$ref": "Membership", - "description": "The most recent version of membership." + "description": "The updated membership." } }, "type": "object" @@ -3554,11 +3554,11 @@ "type": "object" }, "MessageBatchCreatedEventData": { - "description": "Payload for batch new message events where the `EventType` field is `google.workspace.chat.message.v1.batchCreated`.", + "description": "Event payload for multiple new messages. Event type: `google.workspace.chat.message.v1.batchCreated`", "id": "MessageBatchCreatedEventData", "properties": { "messages": { - "description": "A list of created messages.", + "description": "A list of new messages.", "items": { "$ref": "MessageCreatedEventData" }, @@ -3568,7 +3568,7 @@ "type": "object" }, "MessageBatchDeletedEventData": { - "description": "Payload for batch deleted message events where the `EventType` field is `google.workspace.chat.message.v1.batchDeleted`.", + "description": "Event payload for multiple deleted messages. Event type: `google.workspace.chat.message.v1.batchDeleted`", "id": "MessageBatchDeletedEventData", "properties": { "messages": { @@ -3582,7 +3582,7 @@ "type": "object" }, "MessageBatchUpdatedEventData": { - "description": "Payload for batch updated message events where the `EventType` field is `google.workspace.chat.message.v1.batchUpdated`.", + "description": "Event payload for multiple updated messages. Event type: `google.workspace.chat.message.v1.batchUpdated`", "id": "MessageBatchUpdatedEventData", "properties": { "messages": { @@ -3596,34 +3596,34 @@ "type": "object" }, "MessageCreatedEventData": { - "description": "Payload for new message events where the `EventType` field is `google.workspace.chat.message.v1.created`.", + "description": "Event payload for a new message. Event type: `google.workspace.chat.message.v1.created`", "id": "MessageCreatedEventData", "properties": { "message": { "$ref": "Message", - "description": "The most recent version of the message." + "description": "The new message." } }, "type": "object" }, "MessageDeletedEventData": { - "description": "Payload for deleted message events where the `EventType` field is `google.workspace.chat.message.v1.deleted`.", + "description": "Event payload for a deleted message. Event type: `google.workspace.chat.message.v1.deleted`", "id": "MessageDeletedEventData", "properties": { "message": { "$ref": "Message", - "description": "The deleted message. Only `name`, `createTime`, `deleteTime`, and `deletionMetadata` are populated." + "description": "The deleted message. Only the `name`, `createTime`, `deleteTime`, and `deletionMetadata` fields are populated." } }, "type": "object" }, "MessageUpdatedEventData": { - "description": "Payload for updated message events where the `EventType` field is `google.workspace.chat.message.v1.updated`.", + "description": "Event payload for an updated message. Event type: `google.workspace.chat.message.v1.updated`", "id": "MessageUpdatedEventData", "properties": { "message": { "$ref": "Message", - "description": "The most recent version of the message." + "description": "The updated message." } }, "type": "object" @@ -3693,11 +3693,11 @@ "type": "object" }, "ReactionBatchCreatedEventData": { - "description": "Payload for batch new reaction events where the `EventType` field is `google.workspace.chat.reaction.v1.batchCreated`.", + "description": "Event payload for multiple new reactions. Event type: `google.workspace.chat.reaction.v1.batchCreated`", "id": "ReactionBatchCreatedEventData", "properties": { "reactions": { - "description": "A list of created reactions.", + "description": "A list of new reactions.", "items": { "$ref": "ReactionCreatedEventData" }, @@ -3707,7 +3707,7 @@ "type": "object" }, "ReactionBatchDeletedEventData": { - "description": "Payload for batch deleted reaction events where the `EventType` field is `google.workspace.chat.reaction.v1.batchDeleted`.", + "description": "Event payload for multiple deleted reactions. Event type: `google.workspace.chat.reaction.v1.batchDeleted`", "id": "ReactionBatchDeletedEventData", "properties": { "reactions": { @@ -3721,18 +3721,18 @@ "type": "object" }, "ReactionCreatedEventData": { - "description": "Payload for new reaction events where the `EventType` field is `google.workspace.chat.reaction.v1.created`.", + "description": "Event payload for a new reaction. Event type: `google.workspace.chat.reaction.v1.created`", "id": "ReactionCreatedEventData", "properties": { "reaction": { "$ref": "Reaction", - "description": "The created reaction." + "description": "The new reaction." } }, "type": "object" }, "ReactionDeletedEventData": { - "description": "Payload for deleted reaction events where the `EventType` field is `google.workspace.chat.reaction.v1.deleted`.", + "description": "Event payload for a deleted reaction. Type: `google.workspace.chat.reaction.v1.deleted`", "id": "ReactionDeletedEventData", "properties": { "reaction": { @@ -3983,7 +3983,7 @@ "type": "object" }, "SpaceBatchUpdatedEventData": { - "description": "Payload for batch updated space events where the `EventType` field is `google.workspace.chat.space.v1.batchUpdated`.", + "description": "Event payload for multiple updates to a space. Event type: `google.workspace.chat.space.v1.batchUpdated`", "id": "SpaceBatchUpdatedEventData", "properties": { "spaces": { @@ -4023,104 +4023,104 @@ "type": "object" }, "SpaceEvent": { - "description": "An event that happens in a specific space.", + "description": "An event that represents a change or activity in a Google Chat space. To learn more, see [Work with events from Google Chat](https://developers.google.com/workspace/chat/events-overview).", "id": "SpaceEvent", "properties": { "eventTime": { - "description": "Time of the event.", + "description": "Time when the event occurred.", "format": "google-datetime", "type": "string" }, "eventType": { - "description": "Type of the space event. The following event types are supported: * New membership: `google.workspace.chat.membership.v1.created` * Deleted membership: `google.workspace.chat.membership.v1.deleted` * Updated membership: `google.workspace.chat.membership.v1.updated` * New message: `google.workspace.chat.message.v1.created` * Deleted message: `google.workspace.chat.message.v1.deleted` * Updated message: `google.workspace.chat.message.v1.updated` * New reaction: `google.workspace.chat.reaction.v1.created` * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` * Updated space: `google.workspace.chat.space.v1.updated` Note that requesting or subscribing to the preceding event types automatically sets up the subscription or response to also return batched versions of the event type. For example, if you subscribe to `google.workspace.chat.membership.v1.created`, you also receive events for `google.workspace.chat.membership.v1.batchCreated`. For more details see https://developers.google.com/workspace/events/guides/events-chat#output_only_event_types.", + "description": "Type of space event. Each event type has a batch version, which represents multiple instances of the event type that occur in a short period of time. For `spaceEvents.list()` requests, omit batch event types in your query filter. By default, the server returns both event type and its batch version. Supported event types for [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): * New message: `google.workspace.chat.message.v1.created` * Updated message: `google.workspace.chat.message.v1.updated` * Deleted message: `google.workspace.chat.message.v1.deleted` * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` * Multiple updated messages: `google.workspace.chat.message.v1.batchUpdated` * Multiple deleted messages: `google.workspace.chat.message.v1.batchDeleted` Supported event types for [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): * New membership: `google.workspace.chat.membership.v1.created` * Updated membership: `google.workspace.chat.membership.v1.updated` * Deleted membership: `google.workspace.chat.membership.v1.deleted` * Multiple new memberships: `google.workspace.chat.membership.v1.batchCreated` * Multiple updated memberships: `google.workspace.chat.membership.v1.batchUpdated` * Multiple deleted memberships: `google.workspace.chat.membership.v1.batchDeleted` Supported event types for [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): * New reaction: `google.workspace.chat.reaction.v1.created` * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` * Multiple new reactions: `google.workspace.chat.reaction.v1.batchCreated` * Multiple deleted reactions: `google.workspace.chat.reaction.v1.batchDeleted` Supported event types about the [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): * Updated space: `google.workspace.chat.space.v1.updated` * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated`", "type": "string" }, "membershipBatchCreatedEventData": { "$ref": "MembershipBatchCreatedEventData", - "description": "Payload for batch new membership events where the `EventType` field is `google.workspace.chat.membership.v1.batchCreated`." + "description": "Event payload for multiple new memberships. Event type: `google.workspace.chat.membership.v1.batchCreated`" }, "membershipBatchDeletedEventData": { "$ref": "MembershipBatchDeletedEventData", - "description": "Payload for batch deleted membership events where the `EventType` field is `google.workspace.chat.membership.v1.batchDeleted`." + "description": "Event payload for multiple deleted memberships. Event type: `google.workspace.chat.membership.v1.batchDeleted`" }, "membershipBatchUpdatedEventData": { "$ref": "MembershipBatchUpdatedEventData", - "description": "Payload for batch updated membership events where the `EventType` field is `google.workspace.chat.membership.v1.batchUpdated`." + "description": "Event payload for multiple updated memberships. Event type: `google.workspace.chat.membership.v1.batchUpdated`" }, "membershipCreatedEventData": { "$ref": "MembershipCreatedEventData", - "description": "Payload for new membership events where the `EventType` field is `google.workspace.chat.membership.v1.created`." + "description": "Event payload for a new membership. Event type: `google.workspace.chat.membership.v1.created`" }, "membershipDeletedEventData": { "$ref": "MembershipDeletedEventData", - "description": "Payload for deleted membership events where the `EventType` field is `google.workspace.chat.membership.v1.deleted`." + "description": "Event payload for a deleted membership. Event type: `google.workspace.chat.membership.v1.deleted`" }, "membershipUpdatedEventData": { "$ref": "MembershipUpdatedEventData", - "description": "Payload for updated membership events where the `EventType` field is `google.workspace.chat.membership.v1.updated`." + "description": "Event payload for an updated membership. Event type: `google.workspace.chat.membership.v1.updated`" }, "messageBatchCreatedEventData": { "$ref": "MessageBatchCreatedEventData", - "description": "Payload for batch new message events where the `EventType` field is `google.workspace.chat.message.v1.batchCreated`." + "description": "Event payload for multiple new messages. Event type: `google.workspace.chat.message.v1.batchCreated`" }, "messageBatchDeletedEventData": { "$ref": "MessageBatchDeletedEventData", - "description": "Payload for batch deleted message events where the `EventType` field is `google.workspace.chat.message.v1.batchDeleted`." + "description": "Event payload for multiple deleted messages. Event type: `google.workspace.chat.message.v1.batchDeleted`" }, "messageBatchUpdatedEventData": { "$ref": "MessageBatchUpdatedEventData", - "description": "Payload for batch updated message events where the `EventType` field is `google.workspace.chat.message.v1.batchUpdated`." + "description": "Event payload for multiple updated messages. Event type: `google.workspace.chat.message.v1.batchUpdated`" }, "messageCreatedEventData": { "$ref": "MessageCreatedEventData", - "description": "Payload for new message events where the `EventType` field is `google.workspace.chat.message.v1.created`." + "description": "Event payload for a new message. Event type: `google.workspace.chat.message.v1.created`" }, "messageDeletedEventData": { "$ref": "MessageDeletedEventData", - "description": "Payload for deleted message events where the `EventType` field is `google.workspace.chat.message.v1.deleted`." + "description": "Event payload for a deleted message. Event type: `google.workspace.chat.message.v1.deleted`" }, "messageUpdatedEventData": { "$ref": "MessageUpdatedEventData", - "description": "Payload for updated message events where the `EventType` field is `google.workspace.chat.message.v1.updated`." + "description": "Event payload for an updated message. Event type: `google.workspace.chat.message.v1.updated`" }, "name": { - "description": "The resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`", + "description": "Resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`", "type": "string" }, "reactionBatchCreatedEventData": { "$ref": "ReactionBatchCreatedEventData", - "description": "Payload for batch new reaction events where the `EventType` field is `google.workspace.chat.reaction.v1.batchCreated`." + "description": "Event payload for multiple new reactions. Event type: `google.workspace.chat.reaction.v1.batchCreated`" }, "reactionBatchDeletedEventData": { "$ref": "ReactionBatchDeletedEventData", - "description": "Payload for batch deleted reaction events where the `EventType` field is `google.workspace.chat.reaction.v1.batchDeleted`." + "description": "Event payload for multiple deleted reactions. Event type: `google.workspace.chat.reaction.v1.batchDeleted`" }, "reactionCreatedEventData": { "$ref": "ReactionCreatedEventData", - "description": "Payload for new reaction events where the `EventType` field is `google.workspace.chat.reaction.v1.created`." + "description": "Event payload for a new reaction. Event type: `google.workspace.chat.reaction.v1.created`" }, "reactionDeletedEventData": { "$ref": "ReactionDeletedEventData", - "description": "Payload for deleted reaction events where the `EventType` field is `google.workspace.chat.reaction.v1.deleted`." + "description": "Event payload for a deleted reaction. Event type: `google.workspace.chat.reaction.v1.deleted`" }, "spaceBatchUpdatedEventData": { "$ref": "SpaceBatchUpdatedEventData", - "description": "Payload for batch updated space events where the `EventType` field is `google.workspace.chat.space.v1.batchUpdated`." + "description": "Event payload for multiple updates to a space. Event type: `google.workspace.chat.space.v1.batchUpdated`" }, "spaceUpdatedEventData": { "$ref": "SpaceUpdatedEventData", - "description": "Payload for updated space events where the `EventType` field is `google.workspace.chat.space.v1.updated`." + "description": "Event payload for a space update. Event type: `google.workspace.chat.space.v1.updated`" } }, "type": "object" }, "SpaceUpdatedEventData": { - "description": "Payload for updated space events where the `EventType` field is `google.workspace.chat.space.v1.updated`.", + "description": "Event payload for an updated space. Event type: `google.workspace.chat.space.v1.updated`", "id": "SpaceUpdatedEventData", "properties": { "space": { "$ref": "Space", - "description": "The recent version of the space." + "description": "The updated space." } }, "type": "object" diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 7abc96556fa..ab7ccd172f6 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -4411,11 +4411,11 @@ func (s *Membership) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MembershipBatchCreatedEventData: Payload for batch new membership -// events where the `EventType` field is -// `google.workspace.chat.membership.v1.batchCreated`. +// MembershipBatchCreatedEventData: Event payload for multiple new +// memberships. Event type: +// `google.workspace.chat.membership.v1.batchCreated` type MembershipBatchCreatedEventData struct { - // Memberships: A list of created memberships. + // Memberships: A list of new memberships. Memberships []*MembershipCreatedEventData `json:"memberships,omitempty"` // ForceSendFields is a list of field names (e.g. "Memberships") to @@ -4441,9 +4441,9 @@ func (s *MembershipBatchCreatedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MembershipBatchDeletedEventData: Payload for batch deleted membership -// events where the `EventType` field is -// `google.workspace.chat.membership.v1.batchDeleted`. +// MembershipBatchDeletedEventData: Event payload for multiple deleted +// memberships. Event type: +// `google.workspace.chat.membership.v1.batchDeleted` type MembershipBatchDeletedEventData struct { // Memberships: A list of deleted memberships. Memberships []*MembershipDeletedEventData `json:"memberships,omitempty"` @@ -4471,9 +4471,9 @@ func (s *MembershipBatchDeletedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MembershipBatchUpdatedEventData: Payload for batch updated membership -// events where the `EventType` field is -// `google.workspace.chat.membership.v1.batchUpdated`. +// MembershipBatchUpdatedEventData: Event payload for multiple updated +// memberships. Event type: +// `google.workspace.chat.membership.v1.batchUpdated` type MembershipBatchUpdatedEventData struct { // Memberships: A list of updated memberships. Memberships []*MembershipUpdatedEventData `json:"memberships,omitempty"` @@ -4501,11 +4501,10 @@ func (s *MembershipBatchUpdatedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MembershipCreatedEventData: Payload for new membership events where -// the `EventType` field is -// `google.workspace.chat.membership.v1.created`. +// MembershipCreatedEventData: Event payload for a new membership. Event +// type: `google.workspace.chat.membership.v1.created`. type MembershipCreatedEventData struct { - // Membership: The most recent version of membership. + // Membership: The new membership. Membership *Membership `json:"membership,omitempty"` // ForceSendFields is a list of field names (e.g. "Membership") to @@ -4531,12 +4530,11 @@ func (s *MembershipCreatedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MembershipDeletedEventData: Payload for deleted membership events -// where the `EventType` field is -// `google.workspace.chat.membership.v1.deleted`. +// MembershipDeletedEventData: Event payload for a deleted membership. +// Event type: `google.workspace.chat.membership.v1.deleted` type MembershipDeletedEventData struct { - // Membership: The deleted membership. Only `name` and `state` are - // populated. + // Membership: The deleted membership. Only the `name` and `state` + // fields are populated. Membership *Membership `json:"membership,omitempty"` // ForceSendFields is a list of field names (e.g. "Membership") to @@ -4562,11 +4560,10 @@ func (s *MembershipDeletedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MembershipUpdatedEventData: Payload for updated membership events -// where the `EventType` field is -// `google.workspace.chat.membership.v1.updated`. +// MembershipUpdatedEventData: Event payload for an updated membership. +// Event type: `google.workspace.chat.membership.v1.updated` type MembershipUpdatedEventData struct { - // Membership: The most recent version of membership. + // Membership: The updated membership. Membership *Membership `json:"membership,omitempty"` // ForceSendFields is a list of field names (e.g. "Membership") to @@ -4797,11 +4794,10 @@ func (s *Message) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MessageBatchCreatedEventData: Payload for batch new message events -// where the `EventType` field is -// `google.workspace.chat.message.v1.batchCreated`. +// MessageBatchCreatedEventData: Event payload for multiple new +// messages. Event type: `google.workspace.chat.message.v1.batchCreated` type MessageBatchCreatedEventData struct { - // Messages: A list of created messages. + // Messages: A list of new messages. Messages []*MessageCreatedEventData `json:"messages,omitempty"` // ForceSendFields is a list of field names (e.g. "Messages") to @@ -4827,9 +4823,8 @@ func (s *MessageBatchCreatedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MessageBatchDeletedEventData: Payload for batch deleted message -// events where the `EventType` field is -// `google.workspace.chat.message.v1.batchDeleted`. +// MessageBatchDeletedEventData: Event payload for multiple deleted +// messages. Event type: `google.workspace.chat.message.v1.batchDeleted` type MessageBatchDeletedEventData struct { // Messages: A list of deleted messages. Messages []*MessageDeletedEventData `json:"messages,omitempty"` @@ -4857,9 +4852,8 @@ func (s *MessageBatchDeletedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MessageBatchUpdatedEventData: Payload for batch updated message -// events where the `EventType` field is -// `google.workspace.chat.message.v1.batchUpdated`. +// MessageBatchUpdatedEventData: Event payload for multiple updated +// messages. Event type: `google.workspace.chat.message.v1.batchUpdated` type MessageBatchUpdatedEventData struct { // Messages: A list of updated messages. Messages []*MessageUpdatedEventData `json:"messages,omitempty"` @@ -4887,10 +4881,10 @@ func (s *MessageBatchUpdatedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MessageCreatedEventData: Payload for new message events where the -// `EventType` field is `google.workspace.chat.message.v1.created`. +// MessageCreatedEventData: Event payload for a new message. Event type: +// `google.workspace.chat.message.v1.created` type MessageCreatedEventData struct { - // Message: The most recent version of the message. + // Message: The new message. Message *Message `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Message") to @@ -4916,11 +4910,11 @@ func (s *MessageCreatedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MessageDeletedEventData: Payload for deleted message events where the -// `EventType` field is `google.workspace.chat.message.v1.deleted`. +// MessageDeletedEventData: Event payload for a deleted message. Event +// type: `google.workspace.chat.message.v1.deleted` type MessageDeletedEventData struct { - // Message: The deleted message. Only `name`, `createTime`, - // `deleteTime`, and `deletionMetadata` are populated. + // Message: The deleted message. Only the `name`, `createTime`, + // `deleteTime`, and `deletionMetadata` fields are populated. Message *Message `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Message") to @@ -4946,10 +4940,10 @@ func (s *MessageDeletedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MessageUpdatedEventData: Payload for updated message events where the -// `EventType` field is `google.workspace.chat.message.v1.updated`. +// MessageUpdatedEventData: Event payload for an updated message. Event +// type: `google.workspace.chat.message.v1.updated` type MessageUpdatedEventData struct { - // Message: The most recent version of the message. + // Message: The updated message. Message *Message `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Message") to @@ -5109,11 +5103,11 @@ func (s *Reaction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReactionBatchCreatedEventData: Payload for batch new reaction events -// where the `EventType` field is -// `google.workspace.chat.reaction.v1.batchCreated`. +// ReactionBatchCreatedEventData: Event payload for multiple new +// reactions. Event type: +// `google.workspace.chat.reaction.v1.batchCreated` type ReactionBatchCreatedEventData struct { - // Reactions: A list of created reactions. + // Reactions: A list of new reactions. Reactions []*ReactionCreatedEventData `json:"reactions,omitempty"` // ForceSendFields is a list of field names (e.g. "Reactions") to @@ -5139,9 +5133,9 @@ func (s *ReactionBatchCreatedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReactionBatchDeletedEventData: Payload for batch deleted reaction -// events where the `EventType` field is -// `google.workspace.chat.reaction.v1.batchDeleted`. +// ReactionBatchDeletedEventData: Event payload for multiple deleted +// reactions. Event type: +// `google.workspace.chat.reaction.v1.batchDeleted` type ReactionBatchDeletedEventData struct { // Reactions: A list of deleted reactions. Reactions []*ReactionDeletedEventData `json:"reactions,omitempty"` @@ -5169,10 +5163,10 @@ func (s *ReactionBatchDeletedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReactionCreatedEventData: Payload for new reaction events where the -// `EventType` field is `google.workspace.chat.reaction.v1.created`. +// ReactionCreatedEventData: Event payload for a new reaction. Event +// type: `google.workspace.chat.reaction.v1.created` type ReactionCreatedEventData struct { - // Reaction: The created reaction. + // Reaction: The new reaction. Reaction *Reaction `json:"reaction,omitempty"` // ForceSendFields is a list of field names (e.g. "Reaction") to @@ -5198,8 +5192,8 @@ func (s *ReactionCreatedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReactionDeletedEventData: Payload for deleted reaction events where -// the `EventType` field is `google.workspace.chat.reaction.v1.deleted`. +// ReactionDeletedEventData: Event payload for a deleted reaction. Type: +// `google.workspace.chat.reaction.v1.deleted` type ReactionDeletedEventData struct { // Reaction: The deleted reaction. Reaction *Reaction `json:"reaction,omitempty"` @@ -5615,9 +5609,8 @@ func (s *Space) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SpaceBatchUpdatedEventData: Payload for batch updated space events -// where the `EventType` field is -// `google.workspace.chat.space.v1.batchUpdated`. +// SpaceBatchUpdatedEventData: Event payload for multiple updates to a +// space. Event type: `google.workspace.chat.space.v1.batchUpdated` type SpaceBatchUpdatedEventData struct { // Spaces: A list of updated spaces. Spaces []*SpaceUpdatedEventData `json:"spaces,omitempty"` @@ -5714,117 +5707,128 @@ func (s *SpaceDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SpaceEvent: An event that happens in a specific space. +// SpaceEvent: An event that represents a change or activity in a Google +// Chat space. To learn more, see Work with events from Google Chat +// (https://developers.google.com/workspace/chat/events-overview). type SpaceEvent struct { - // EventTime: Time of the event. + // EventTime: Time when the event occurred. EventTime string `json:"eventTime,omitempty"` - // EventType: Type of the space event. The following event types are - // supported: * New membership: - // `google.workspace.chat.membership.v1.created` * Deleted membership: - // `google.workspace.chat.membership.v1.deleted` * Updated membership: - // `google.workspace.chat.membership.v1.updated` * New message: - // `google.workspace.chat.message.v1.created` * Deleted message: - // `google.workspace.chat.message.v1.deleted` * Updated message: - // `google.workspace.chat.message.v1.updated` * New reaction: - // `google.workspace.chat.reaction.v1.created` * Deleted reaction: - // `google.workspace.chat.reaction.v1.deleted` * Updated space: - // `google.workspace.chat.space.v1.updated` Note that requesting or - // subscribing to the preceding event types automatically sets up the - // subscription or response to also return batched versions of the event - // type. For example, if you subscribe to - // `google.workspace.chat.membership.v1.created`, you also receive - // events for `google.workspace.chat.membership.v1.batchCreated`. For - // more details see - // https://developers.google.com/workspace/events/guides/events-chat#output_only_event_types. + // EventType: Type of space event. Each event type has a batch version, + // which represents multiple instances of the event type that occur in a + // short period of time. For `spaceEvents.list()` requests, omit batch + // event types in your query filter. By default, the server returns both + // event type and its batch version. Supported event types for messages + // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): + // * New message: `google.workspace.chat.message.v1.created` * Updated + // message: `google.workspace.chat.message.v1.updated` * Deleted + // message: `google.workspace.chat.message.v1.deleted` * Multiple new + // messages: `google.workspace.chat.message.v1.batchCreated` * Multiple + // updated messages: `google.workspace.chat.message.v1.batchUpdated` * + // Multiple deleted messages: + // `google.workspace.chat.message.v1.batchDeleted` Supported event types + // for memberships + // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): + // * New membership: `google.workspace.chat.membership.v1.created` * + // Updated membership: `google.workspace.chat.membership.v1.updated` * + // Deleted membership: `google.workspace.chat.membership.v1.deleted` * + // Multiple new memberships: + // `google.workspace.chat.membership.v1.batchCreated` * Multiple updated + // memberships: `google.workspace.chat.membership.v1.batchUpdated` * + // Multiple deleted memberships: + // `google.workspace.chat.membership.v1.batchDeleted` Supported event + // types for reactions + // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): + // * New reaction: `google.workspace.chat.reaction.v1.created` * Deleted + // reaction: `google.workspace.chat.reaction.v1.deleted` * Multiple new + // reactions: `google.workspace.chat.reaction.v1.batchCreated` * + // Multiple deleted reactions: + // `google.workspace.chat.reaction.v1.batchDeleted` Supported event + // types about the space + // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): + // * Updated space: `google.workspace.chat.space.v1.updated` * Multiple + // space updates: `google.workspace.chat.space.v1.batchUpdated` EventType string `json:"eventType,omitempty"` - // MembershipBatchCreatedEventData: Payload for batch new membership - // events where the `EventType` field is - // `google.workspace.chat.membership.v1.batchCreated`. + // MembershipBatchCreatedEventData: Event payload for multiple new + // memberships. Event type: + // `google.workspace.chat.membership.v1.batchCreated` MembershipBatchCreatedEventData *MembershipBatchCreatedEventData `json:"membershipBatchCreatedEventData,omitempty"` - // MembershipBatchDeletedEventData: Payload for batch deleted membership - // events where the `EventType` field is - // `google.workspace.chat.membership.v1.batchDeleted`. + // MembershipBatchDeletedEventData: Event payload for multiple deleted + // memberships. Event type: + // `google.workspace.chat.membership.v1.batchDeleted` MembershipBatchDeletedEventData *MembershipBatchDeletedEventData `json:"membershipBatchDeletedEventData,omitempty"` - // MembershipBatchUpdatedEventData: Payload for batch updated membership - // events where the `EventType` field is - // `google.workspace.chat.membership.v1.batchUpdated`. + // MembershipBatchUpdatedEventData: Event payload for multiple updated + // memberships. Event type: + // `google.workspace.chat.membership.v1.batchUpdated` MembershipBatchUpdatedEventData *MembershipBatchUpdatedEventData `json:"membershipBatchUpdatedEventData,omitempty"` - // MembershipCreatedEventData: Payload for new membership events where - // the `EventType` field is - // `google.workspace.chat.membership.v1.created`. + // MembershipCreatedEventData: Event payload for a new membership. Event + // type: `google.workspace.chat.membership.v1.created` MembershipCreatedEventData *MembershipCreatedEventData `json:"membershipCreatedEventData,omitempty"` - // MembershipDeletedEventData: Payload for deleted membership events - // where the `EventType` field is - // `google.workspace.chat.membership.v1.deleted`. + // MembershipDeletedEventData: Event payload for a deleted membership. + // Event type: `google.workspace.chat.membership.v1.deleted` MembershipDeletedEventData *MembershipDeletedEventData `json:"membershipDeletedEventData,omitempty"` - // MembershipUpdatedEventData: Payload for updated membership events - // where the `EventType` field is - // `google.workspace.chat.membership.v1.updated`. + // MembershipUpdatedEventData: Event payload for an updated membership. + // Event type: `google.workspace.chat.membership.v1.updated` MembershipUpdatedEventData *MembershipUpdatedEventData `json:"membershipUpdatedEventData,omitempty"` - // MessageBatchCreatedEventData: Payload for batch new message events - // where the `EventType` field is - // `google.workspace.chat.message.v1.batchCreated`. + // MessageBatchCreatedEventData: Event payload for multiple new + // messages. Event type: `google.workspace.chat.message.v1.batchCreated` MessageBatchCreatedEventData *MessageBatchCreatedEventData `json:"messageBatchCreatedEventData,omitempty"` - // MessageBatchDeletedEventData: Payload for batch deleted message - // events where the `EventType` field is - // `google.workspace.chat.message.v1.batchDeleted`. + // MessageBatchDeletedEventData: Event payload for multiple deleted + // messages. Event type: `google.workspace.chat.message.v1.batchDeleted` MessageBatchDeletedEventData *MessageBatchDeletedEventData `json:"messageBatchDeletedEventData,omitempty"` - // MessageBatchUpdatedEventData: Payload for batch updated message - // events where the `EventType` field is - // `google.workspace.chat.message.v1.batchUpdated`. + // MessageBatchUpdatedEventData: Event payload for multiple updated + // messages. Event type: `google.workspace.chat.message.v1.batchUpdated` MessageBatchUpdatedEventData *MessageBatchUpdatedEventData `json:"messageBatchUpdatedEventData,omitempty"` - // MessageCreatedEventData: Payload for new message events where the - // `EventType` field is `google.workspace.chat.message.v1.created`. + // MessageCreatedEventData: Event payload for a new message. Event type: + // `google.workspace.chat.message.v1.created` MessageCreatedEventData *MessageCreatedEventData `json:"messageCreatedEventData,omitempty"` - // MessageDeletedEventData: Payload for deleted message events where the - // `EventType` field is `google.workspace.chat.message.v1.deleted`. + // MessageDeletedEventData: Event payload for a deleted message. Event + // type: `google.workspace.chat.message.v1.deleted` MessageDeletedEventData *MessageDeletedEventData `json:"messageDeletedEventData,omitempty"` - // MessageUpdatedEventData: Payload for updated message events where the - // `EventType` field is `google.workspace.chat.message.v1.updated`. + // MessageUpdatedEventData: Event payload for an updated message. Event + // type: `google.workspace.chat.message.v1.updated` MessageUpdatedEventData *MessageUpdatedEventData `json:"messageUpdatedEventData,omitempty"` - // Name: The resource name of the space event. Format: + // Name: Resource name of the space event. Format: // `spaces/{space}/spaceEvents/{spaceEvent}` Name string `json:"name,omitempty"` - // ReactionBatchCreatedEventData: Payload for batch new reaction events - // where the `EventType` field is - // `google.workspace.chat.reaction.v1.batchCreated`. + // ReactionBatchCreatedEventData: Event payload for multiple new + // reactions. Event type: + // `google.workspace.chat.reaction.v1.batchCreated` ReactionBatchCreatedEventData *ReactionBatchCreatedEventData `json:"reactionBatchCreatedEventData,omitempty"` - // ReactionBatchDeletedEventData: Payload for batch deleted reaction - // events where the `EventType` field is - // `google.workspace.chat.reaction.v1.batchDeleted`. + // ReactionBatchDeletedEventData: Event payload for multiple deleted + // reactions. Event type: + // `google.workspace.chat.reaction.v1.batchDeleted` ReactionBatchDeletedEventData *ReactionBatchDeletedEventData `json:"reactionBatchDeletedEventData,omitempty"` - // ReactionCreatedEventData: Payload for new reaction events where the - // `EventType` field is `google.workspace.chat.reaction.v1.created`. + // ReactionCreatedEventData: Event payload for a new reaction. Event + // type: `google.workspace.chat.reaction.v1.created` ReactionCreatedEventData *ReactionCreatedEventData `json:"reactionCreatedEventData,omitempty"` - // ReactionDeletedEventData: Payload for deleted reaction events where - // the `EventType` field is `google.workspace.chat.reaction.v1.deleted`. + // ReactionDeletedEventData: Event payload for a deleted reaction. Event + // type: `google.workspace.chat.reaction.v1.deleted` ReactionDeletedEventData *ReactionDeletedEventData `json:"reactionDeletedEventData,omitempty"` - // SpaceBatchUpdatedEventData: Payload for batch updated space events - // where the `EventType` field is - // `google.workspace.chat.space.v1.batchUpdated`. + // SpaceBatchUpdatedEventData: Event payload for multiple updates to a + // space. Event type: `google.workspace.chat.space.v1.batchUpdated` SpaceBatchUpdatedEventData *SpaceBatchUpdatedEventData `json:"spaceBatchUpdatedEventData,omitempty"` - // SpaceUpdatedEventData: Payload for updated space events where the - // `EventType` field is `google.workspace.chat.space.v1.updated`. + // SpaceUpdatedEventData: Event payload for a space update. Event type: + // `google.workspace.chat.space.v1.updated` SpaceUpdatedEventData *SpaceUpdatedEventData `json:"spaceUpdatedEventData,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -5854,10 +5858,10 @@ func (s *SpaceEvent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SpaceUpdatedEventData: Payload for updated space events where the -// `EventType` field is `google.workspace.chat.space.v1.updated`. +// SpaceUpdatedEventData: Event payload for an updated space. Event +// type: `google.workspace.chat.space.v1.updated` type SpaceUpdatedEventData struct { - // Space: The recent version of the space. + // Space: The updated space. Space *Space `json:"space,omitempty"` // ForceSendFields is a list of field names (e.g. "Space") to @@ -10775,15 +10779,18 @@ type SpacesSpaceEventsGetCall struct { header_ http.Header } -// Get: Returns a SpaceEvent. You can request events from up to 28 days -// before the time of the request. The server will return the most -// recent version of the resource. For example, if a -// `google.workspace.chat.message.v1.created` event is requested and the -// message has since been deleted, the returned event will contain the -// deleted message resource in the payload. Requires user authentication -// (https://developers.google.com/chat/api/guides/auth/users). +// Get: Returns an event from a Google Chat space. The event payload +// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) +// contains the most recent version of the resource that changed. For +// example, if you request an event about a new message but the message +// was later updated, the server returns the updated `Message` resource +// in the event payload. Requires user authentication +// (https://developers.google.com/chat/api/guides/auth/users). To get an +// event, the authenticated user must be a member of the space. For an +// example, see Get details about an event from a Google Chat space +// (https://developers.google.com/workspace/chat/get-space-event). // -// - name: The resource name of the event. Format: +// - name: The resource name of the space event. Format: // `spaces/{space}/spaceEvents/{spaceEvent}`. func (r *SpacesSpaceEventsService) Get(name string) *SpacesSpaceEventsGetCall { c := &SpacesSpaceEventsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -10890,7 +10897,7 @@ func (c *SpacesSpaceEventsGetCall) Do(opts ...googleapi.CallOption) (*SpaceEvent } return ret, nil // { - // "description": "Returns a SpaceEvent. You can request events from up to 28 days before the time of the request. The server will return the most recent version of the resource. For example, if a `google.workspace.chat.message.v1.created` event is requested and the message has since been deleted, the returned event will contain the deleted message resource in the payload. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", + // "description": "Returns an event from a Google Chat space. The [event payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated `Message` resource in the event payload. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). To get an event, the authenticated user must be a member of the space. For an example, see [Get details about an event from a Google Chat space](https://developers.google.com/workspace/chat/get-space-event).", // "flatPath": "v1/spaces/{spacesId}/spaceEvents/{spaceEventsId}", // "httpMethod": "GET", // "id": "chat.spaces.spaceEvents.get", @@ -10899,7 +10906,7 @@ func (c *SpacesSpaceEventsGetCall) Do(opts ...googleapi.CallOption) (*SpaceEvent // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`", + // "description": "Required. The resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`", // "location": "path", // "pattern": "^spaces/[^/]+/spaceEvents/[^/]+$", // "required": true, @@ -10935,17 +10942,23 @@ type SpacesSpaceEventsListCall struct { header_ http.Header } -// List: Lists SpaceEvents in a space that the caller is a member of. -// You can request events from up to 28 days before the time of the -// request. The server will return the most recent version of the -// resources. For example, if a -// `google.workspace.chat.message.v1.created` event is requested and the -// message has since been deleted, the returned event will contain the -// deleted message resource in the payload. Requires user authentication -// (https://developers.google.com/chat/api/guides/auth/users). +// List: Lists events from a Google Chat space. For each event, the +// payload +// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) +// contains the most recent version of the Chat resource. For example, +// if you list events about new space members, the server returns +// `Membership` resources that contain the latest membership details. If +// new members were removed during the requested period, the event +// payload contains an empty `Membership` resource. Requires user +// authentication +// (https://developers.google.com/chat/api/guides/auth/users). To list +// events, the authenticated user must be a member of the space. For an +// example, see List events from a Google Chat space +// (https://developers.google.com/workspace/chat/list-space-events). // -// - parent: The resource name of the space from which to list events. -// Format: `spaces/{space}`. +// - parent: Resource name of the Google Chat space +// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) +// where the events occurred. Format: `spaces/{space}`. func (r *SpacesSpaceEventsService) List(parent string) *SpacesSpaceEventsListCall { c := &SpacesSpaceEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -10953,21 +10966,27 @@ func (r *SpacesSpaceEventsService) List(parent string) *SpacesSpaceEventsListCal } // Filter sets the optional parameter "filter": Required. A query -// filter. This method supports filtering by: `event_types`, -// `start_time`, and `end_time`. `event_types`: You must specify at -// least one event type in your query. `event_types` supports the has -// `:` operator. To filter by multiple event types, use the `OR` -// operator. To see the list of currently supported event types, see -// google.chat.v1.SpaceEvent.event_type `start_time`: Exclusive -// timestamp from which to start listing space events. You can list -// events that occurred up to 28 days ago. If unspecified, lists space -// events from the 28 days ago up to end time. `end_time`: Inclusive -// timestamp up to which space events are listed. Default value is the -// present. `start_time` and `end_time` accept a timestamp in RFC-3339 -// (https://www.rfc-editor.org/rfc/rfc3339) format and support the -// equals `=` comparison operator. To filter by both `start_time` and -// `end_time`, use the `AND` operator. For example, the following -// queries are valid: ``` start_time="2023-08-23T19:20:33+00:00" AND +// filter. You must specify at least one event type (`event_type`) using +// the has `:` operator. To filter by multiple event types, use the `OR` +// operator. Omit batch event types in your filter. The request +// automatically returns any related batch events. For example, if you +// filter by new reactions +// (`google.workspace.chat.reaction.v1.created`), the server also +// returns batch new reactions events +// (`google.workspace.chat.reaction.v1.batchCreated`). For a list of +// supported event types, see the `SpaceEvents` reference documentation +// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). +// Optionally, you can also filter by start time (`start_time`) and end +// time (`end_time`): * `start_time`: Exclusive timestamp from which to +// start listing space events. You can list events that occurred up to +// 28 days ago. If unspecified, lists space events from the past 28 +// days. * `end_time`: Inclusive timestamp until which space events are +// listed. If unspecified, lists events up to the time of the request. +// To specify a start or end time, use the equals `=` operator and +// format in RFC-3339 (https://www.rfc-editor.org/rfc/rfc3339). To +// filter by both `start_time` and `end_time`, use the `AND` operator. +// For example, the following queries are valid: ``` +// start_time="2023-08-23T19:20:33+00:00" AND // end_time="2023-08-23T19:21:54+00:00" ``` ``` // start_time="2023-08-23T19:20:33+00:00" AND // (event_types:"google.workspace.chat.space.v1.updated" OR @@ -10984,7 +11003,7 @@ func (c *SpacesSpaceEventsListCall) Filter(filter string) *SpacesSpaceEventsList } // PageSize sets the optional parameter "pageSize": The maximum number -// of space events returned. The service may return fewer than this +// of space events returned. The service might return fewer than this // value. Negative values return an `INVALID_ARGUMENT` error. func (c *SpacesSpaceEventsListCall) PageSize(pageSize int64) *SpacesSpaceEventsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) @@ -11101,7 +11120,7 @@ func (c *SpacesSpaceEventsListCall) Do(opts ...googleapi.CallOption) (*ListSpace } return ret, nil // { - // "description": "Lists SpaceEvents in a space that the caller is a member of. You can request events from up to 28 days before the time of the request. The server will return the most recent version of the resources. For example, if a `google.workspace.chat.message.v1.created` event is requested and the message has since been deleted, the returned event will contain the deleted message resource in the payload. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", + // "description": "Lists events from a Google Chat space. For each event, the [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns `Membership` resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty `Membership` resource. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). To list events, the authenticated user must be a member of the space. For an example, see [List events from a Google Chat space](https://developers.google.com/workspace/chat/list-space-events).", // "flatPath": "v1/spaces/{spacesId}/spaceEvents", // "httpMethod": "GET", // "id": "chat.spaces.spaceEvents.list", @@ -11110,12 +11129,12 @@ func (c *SpacesSpaceEventsListCall) Do(opts ...googleapi.CallOption) (*ListSpace // ], // "parameters": { // "filter": { - // "description": "Required. A query filter. This method supports filtering by: `event_types`, `start_time`, and `end_time`. `event_types`: You must specify at least one event type in your query. `event_types` supports the has `:` operator. To filter by multiple event types, use the `OR` operator. To see the list of currently supported event types, see google.chat.v1.SpaceEvent.event_type `start_time`: Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the 28 days ago up to end time. `end_time`: Inclusive timestamp up to which space events are listed. Default value is the present. `start_time` and `end_time` accept a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and support the equals `=` comparison operator. To filter by both `start_time` and `end_time`, use the `AND` operator. For example, the following queries are valid: ``` start_time=\"2023-08-23T19:20:33+00:00\" AND end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` start_time=\"2023-08-23T19:20:33+00:00\" AND (event_types:\"google.workspace.chat.space.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\") ``` The following queries are invalid: ``` start_time=\"2023-08-23T19:20:33+00:00\" OR end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` event_types:\"google.workspace.chat.space.v1.updated\" AND event_types:\"google.workspace.chat.message.v1.created\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", + // "description": "Required. A query filter. You must specify at least one event type (`event_type`) using the has `:` operator. To filter by multiple event types, use the `OR` operator. Omit batch event types in your filter. The request automatically returns any related batch events. For example, if you filter by new reactions (`google.workspace.chat.reaction.v1.created`), the server also returns batch new reactions events (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported event types, see the [`SpaceEvents` reference documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). Optionally, you can also filter by start time (`start_time`) and end time (`end_time`): * `start_time`: Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the past 28 days. * `end_time`: Inclusive timestamp until which space events are listed. If unspecified, lists events up to the time of the request. To specify a start or end time, use the equals `=` operator and format in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both `start_time` and `end_time`, use the `AND` operator. For example, the following queries are valid: ``` start_time=\"2023-08-23T19:20:33+00:00\" AND end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` start_time=\"2023-08-23T19:20:33+00:00\" AND (event_types:\"google.workspace.chat.space.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\") ``` The following queries are invalid: ``` start_time=\"2023-08-23T19:20:33+00:00\" OR end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` event_types:\"google.workspace.chat.space.v1.updated\" AND event_types:\"google.workspace.chat.message.v1.created\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Optional. The maximum number of space events returned. The service may return fewer than this value. Negative values return an `INVALID_ARGUMENT` error.", + // "description": "Optional. The maximum number of space events returned. The service might return fewer than this value. Negative values return an `INVALID_ARGUMENT` error.", // "format": "int32", // "location": "query", // "type": "integer" @@ -11126,7 +11145,7 @@ func (c *SpacesSpaceEventsListCall) Do(opts ...googleapi.CallOption) (*ListSpace // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the space from which to list events. Format: `spaces/{space}`.", + // "description": "Required. Resource name of the [Google Chat space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) where the events occurred. Format: `spaces/{space}`.", // "location": "path", // "pattern": "^spaces/[^/]+$", // "required": true, diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 53904a1f949..5f7efa7265c 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1042,7 +1042,7 @@ } } }, - "revision": "20240307", + "revision": "20240328", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -4394,11 +4394,11 @@ "type": "string" }, "name": { - "description": "The resource name of the processor version. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`", + "description": "Identifier. The resource name of the processor version. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`", "type": "string" }, "state": { - "description": "The state of the processor version.", + "description": "Output only. The state of the processor version.", "enum": [ "STATE_UNSPECIFIED", "DEPLOYED", @@ -4421,6 +4421,7 @@ "The processor version failed and is in an indeterminate state.", "The processor version is being imported." ], + "readOnly": true, "type": "string" } }, diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index d9e9eb21a3a..ddeffaabe7d 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -5935,12 +5935,12 @@ type GoogleCloudDocumentaiV1ProcessorVersion struct { // "MODEL_TYPE_CUSTOM" - The processor version has custom model type. ModelType string `json:"modelType,omitempty"` - // Name: The resource name of the processor version. Format: + // Name: Identifier. The resource name of the processor version. Format: // `projects/{project}/locations/{location}/processors/{processor}/proces // sorVersions/{processor_version}` Name string `json:"name,omitempty"` - // State: The state of the processor version. + // State: Output only. The state of the processor version. // // Possible values: // "STATE_UNSPECIFIED" - The processor version is in an unspecified diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index da791fcf496..d2702a2f6f6 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -1284,7 +1284,7 @@ } } }, - "revision": "20240307", + "revision": "20240328", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -8414,11 +8414,11 @@ "type": "string" }, "name": { - "description": "The resource name of the processor version. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`", + "description": "Identifier. The resource name of the processor version. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}`", "type": "string" }, "state": { - "description": "The state of the processor version.", + "description": "Output only. The state of the processor version.", "enum": [ "STATE_UNSPECIFIED", "DEPLOYED", @@ -8441,6 +8441,7 @@ "The processor version failed and is in an indeterminate state.", "The processor version is being imported." ], + "readOnly": true, "type": "string" } }, diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index d3f5a9f4361..cbb34df6e66 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -12295,12 +12295,12 @@ type GoogleCloudDocumentaiV1beta3ProcessorVersion struct { // "MODEL_TYPE_CUSTOM" - The processor version has custom model type. ModelType string `json:"modelType,omitempty"` - // Name: The resource name of the processor version. Format: + // Name: Identifier. The resource name of the processor version. Format: // `projects/{project}/locations/{location}/processors/{processor}/proces // sorVersions/{processor_version}` Name string `json:"name,omitempty"` - // State: The state of the processor version. + // State: Output only. The state of the processor version. // // Possible values: // "STATE_UNSPECIFIED" - The processor version is in an unspecified diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 48e29a9544d..82b9dee1088 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -2087,7 +2087,7 @@ } } }, - "revision": "20240315", + "revision": "20240401", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5318,6 +5318,10 @@ }, "type": "array" }, + "ignoreRecsDenylist": { + "description": "When the flag is enabled, the products in the denylist will not be filtered out in the recommendation filtering results.", + "type": "boolean" + }, "modelId": { "description": "The id of the model in the same Catalog to use at serving time. Currently only RecommendationModels are supported: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.", "type": "string" diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index fb07c81177d..4b526545489 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -6663,6 +6663,11 @@ type GoogleCloudRetailV2ServingConfig struct { // is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH. IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` + // IgnoreRecsDenylist: When the flag is enabled, the products in the + // denylist will not be filtered out in the recommendation filtering + // results. + IgnoreRecsDenylist bool `json:"ignoreRecsDenylist,omitempty"` + // ModelId: The id of the model in the same Catalog to use at serving // time. Currently only RecommendationModels are supported: // https://cloud.google.com/retail/recommendations-ai/docs/create-models diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 07e19ef4c7f..d0193432ae3 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2475,7 +2475,7 @@ } } }, - "revision": "20240315", + "revision": "20240401", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6928,6 +6928,10 @@ }, "type": "array" }, + "ignoreRecsDenylist": { + "description": "When the flag is enabled, the products in the denylist will not be filtered out in the recommendation filtering results.", + "type": "boolean" + }, "modelId": { "description": "The id of the model in the same Catalog to use at serving time. Currently only RecommendationModels are supported: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.", "type": "string" diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 4d87046a217..50db48c9b68 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -8911,6 +8911,11 @@ type GoogleCloudRetailV2alphaServingConfig struct { // is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH. IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` + // IgnoreRecsDenylist: When the flag is enabled, the products in the + // denylist will not be filtered out in the recommendation filtering + // results. + IgnoreRecsDenylist bool `json:"ignoreRecsDenylist,omitempty"` + // ModelId: The id of the model in the same Catalog to use at serving // time. Currently only RecommendationModels are supported: // https://cloud.google.com/retail/recommendations-ai/docs/create-models diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 60d32116a14..165d6a816c1 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2115,7 +2115,7 @@ } } }, - "revision": "20240315", + "revision": "20240401", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -7011,6 +7011,10 @@ }, "type": "array" }, + "ignoreRecsDenylist": { + "description": "When the flag is enabled, the products in the denylist will not be filtered out in the recommendation filtering results.", + "type": "boolean" + }, "modelId": { "description": "The id of the model in the same Catalog to use at serving time. Currently only RecommendationModels are supported: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.", "type": "string" diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index d21ece70b2d..674c38966e4 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -9630,6 +9630,11 @@ type GoogleCloudRetailV2betaServingConfig struct { // is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH. IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` + // IgnoreRecsDenylist: When the flag is enabled, the products in the + // denylist will not be filtered out in the recommendation filtering + // results. + IgnoreRecsDenylist bool `json:"ignoreRecsDenylist,omitempty"` + // ModelId: The id of the model in the same Catalog to use at serving // time. Currently only RecommendationModels are supported: // https://cloud.google.com/retail/recommendations-ai/docs/create-models