From 0a6ebe42419ee01f95ff02cd51e041d4fe7a0678 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 5 Dec 2023 00:22:14 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2291) --- accessapproval/v1/accessapproval-api.json | 10 +- accessapproval/v1/accessapproval-gen.go | 13 +- .../v1/advisorynotifications-api.json | 111 +- .../v1/advisorynotifications-gen.go | 479 ++- aiplatform/v1/aiplatform-api.json | 469 ++- aiplatform/v1/aiplatform-gen.go | 1300 +++++++- aiplatform/v1beta1/aiplatform-api.json | 1136 ++++++- aiplatform/v1beta1/aiplatform-gen.go | 2896 ++++++++++++++++- analyticsdata/v1beta/analyticsdata-api.json | 359 +- analyticsdata/v1beta/analyticsdata-gen.go | 1142 +++++++ assuredworkloads/v1/assuredworkloads-api.json | 35 +- assuredworkloads/v1/assuredworkloads-gen.go | 148 +- .../v1beta1/assuredworkloads-api.json | 4 +- .../v1beta1/assuredworkloads-gen.go | 2 +- chat/v1/chat-api.json | 25 +- chat/v1/chat-gen.go | 56 +- connectors/v1/connectors-api.json | 119 +- connectors/v1/connectors-gen.go | 215 +- content/v2.1/content-api.json | 776 +---- content/v2.1/content-gen.go | 2147 ------------ datafusion/v1/datafusion-api.json | 112 +- datafusion/v1/datafusion-gen.go | 238 +- datafusion/v1beta1/datafusion-api.json | 72 +- datafusion/v1beta1/datafusion-gen.go | 136 +- monitoring/v3/monitoring-api.json | 4 +- monitoring/v3/monitoring-gen.go | 5 +- orgpolicy/v2/orgpolicy-api.json | 4 +- orgpolicy/v2/orgpolicy-gen.go | 6 +- places/v1/places-api.json | 6 +- places/v1/places-gen.go | 10 +- policysimulator/v1/policysimulator-api.json | 4 +- policysimulator/v1/policysimulator-gen.go | 6 +- .../v1alpha/policysimulator-api.json | 4 +- .../v1alpha/policysimulator-gen.go | 6 +- .../v1beta/policysimulator-api.json | 4 +- policysimulator/v1beta/policysimulator-gen.go | 6 +- recommender/v1/recommender-api.json | 8 +- recommender/v1/recommender-gen.go | 6 +- recommender/v1beta1/recommender-api.json | 18 +- recommender/v1beta1/recommender-gen.go | 10 +- storagetransfer/v1/storagetransfer-api.json | 4 +- storagetransfer/v1/storagetransfer-gen.go | 13 +- .../v1/streetviewpublish-api.json | 8 +- streetviewpublish/v1/streetviewpublish-gen.go | 1 + translate/v3/translate-api.json | 672 +++- translate/v3/translate-gen.go | 2746 ++++++++++++++-- 46 files changed, 12056 insertions(+), 3495 deletions(-) diff --git a/accessapproval/v1/accessapproval-api.json b/accessapproval/v1/accessapproval-api.json index d24dc2f6176..43539d9e524 100644 --- a/accessapproval/v1/accessapproval-api.json +++ b/accessapproval/v1/accessapproval-api.json @@ -913,7 +913,7 @@ } } }, - "revision": "20231110", + "revision": "20231201", "rootUrl": "https://accessapproval.googleapis.com/", "schemas": { "AccessApprovalServiceAccount": { @@ -1018,7 +1018,8 @@ "GOOGLE_INITIATED_SERVICE", "GOOGLE_INITIATED_REVIEW", "THIRD_PARTY_DATA_REQUEST", - "GOOGLE_RESPONSE_TO_PRODUCTION_ALERT" + "GOOGLE_RESPONSE_TO_PRODUCTION_ALERT", + "CLOUD_INITIATED_ACCESS" ], "enumDescriptions": [ "Default value for proto, shouldn't be used.", @@ -1026,7 +1027,8 @@ "The principal accessed customer data in order to diagnose or resolve a suspected issue in services. Often this access is used to confirm that customers are not affected by a suspected service issue or to remediate a reversible system issue.", "Google initiated service for security, fraud, abuse, or compliance purposes.", "The principal was compelled to access customer data in order to respond to a legal third party data request or process, including legal processes from customers themselves.", - "The principal accessed customer data in order to diagnose or resolve a suspected issue in services or a known outage." + "The principal accessed customer data in order to diagnose or resolve a suspected issue in services or a known outage.", + "Similar to 'GOOGLE_INITIATED_SERVICE' or 'GOOGLE_INITIATED_REVIEW', but meant to reflect when the cloud operator is not Google (namely, a TPC operator), and accessed customer data in order to diagnose or resolve a suspected issue in services or a known outage, or for security, fraud, abuse, or compliance review purposes." ], "type": "string" } @@ -1302,7 +1304,7 @@ "type": "string" }, "serializedApprovalRequest": { - "description": "The serialized ApprovalRequest message without the approve.signature_info field. This to allow the customer to verify signatures if they want to.", + "description": "The ApprovalRequest that is serialized without the SignatureInfo message field. This data is used with the hashing algorithm to generate the digital signature, and it can be used for signature verification.", "format": "byte", "type": "string" }, diff --git a/accessapproval/v1/accessapproval-gen.go b/accessapproval/v1/accessapproval-gen.go index 9062dc19b1b..13dc4ec68bc 100644 --- a/accessapproval/v1/accessapproval-gen.go +++ b/accessapproval/v1/accessapproval-gen.go @@ -432,6 +432,12 @@ type AccessReason struct { // "GOOGLE_RESPONSE_TO_PRODUCTION_ALERT" - The principal accessed // customer data in order to diagnose or resolve a suspected issue in // services or a known outage. + // "CLOUD_INITIATED_ACCESS" - Similar to 'GOOGLE_INITIATED_SERVICE' or + // 'GOOGLE_INITIATED_REVIEW', but meant to reflect when the cloud + // operator is not Google (namely, a TPC operator), and accessed + // customer data in order to diagnose or resolve a suspected issue in + // services or a known outage, or for security, fraud, abuse, or + // compliance review purposes. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Detail") to @@ -872,9 +878,10 @@ type SignatureInfo struct { // which may be verified using this public key. GooglePublicKeyPem string `json:"googlePublicKeyPem,omitempty"` - // SerializedApprovalRequest: The serialized ApprovalRequest message - // without the approve.signature_info field. This to allow the customer - // to verify signatures if they want to. + // SerializedApprovalRequest: The ApprovalRequest that is serialized + // without the SignatureInfo message field. This data is used with the + // hashing algorithm to generate the digital signature, and it can be + // used for signature verification. SerializedApprovalRequest string `json:"serializedApprovalRequest,omitempty"` // Signature: The digital signature. diff --git a/advisorynotifications/v1/advisorynotifications-api.json b/advisorynotifications/v1/advisorynotifications-api.json index 4d7bf08155d..b5885b3fe7d 100644 --- a/advisorynotifications/v1/advisorynotifications-api.json +++ b/advisorynotifications/v1/advisorynotifications-api.json @@ -144,7 +144,7 @@ ], "parameters": { "name": { - "description": "Output only. 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.", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/settings$", "required": true, @@ -181,7 +181,7 @@ "type": "string" }, "name": { - "description": "Required. A name of the notification to retrieve. Format: organizations/{organization}/locations/{location}/notifications/{notification}.", + "description": "Required. A name of the notification to retrieve. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{projects}/locations/{location}/notifications/{notification}.", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/notifications/[^/]+$", "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}\"", + "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, @@ -257,9 +257,107 @@ } } } + }, + "projects": { + "resources": { + "locations": { + "resources": { + "notifications": { + "methods": { + "get": { + "description": "Gets a notification.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notifications/{notificationsId}", + "httpMethod": "GET", + "id": "advisorynotifications.projects.locations.notifications.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "languageCode": { + "description": "ISO code for requested localization language. If unset, will be interpereted as \"en\". If the requested language is valid, but not supported for this notification, English will be returned with an \"Not applicable\" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. A name of the notification to retrieve. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{projects}/locations/{location}/notifications/{notification}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notifications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudAdvisorynotificationsV1Notification" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists notifications under a given parent.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notifications", + "httpMethod": "GET", + "id": "advisorynotifications.projects.locations.notifications.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "languageCode": { + "description": "ISO code for requested localization language. If unset, will be interpereted as \"en\". If the requested language is valid, but not supported for this notification, English will be returned with an \"Not applicable\" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of notifications to return. The service may return fewer than this value. If unspecified or equal to 0, at most 50 notifications will be returned. The maximum value is 50; values above 50 will be coerced to 50.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token returned from a previous request. When paginating, all other parameters provided in the request must match the call that returned the page token.", + "location": "query", + "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}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Specifies which parts of the notification resource should be returned in the response.", + "enum": [ + "NOTIFICATION_VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "Not specified, equivalent to BASIC.", + "Server responses only include title, creation time and Notification ID. Note: for internal use responses also include the last update time, the latest message text and whether notification has attachments.", + "Include everything." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/notifications", + "response": { + "$ref": "GoogleCloudAdvisorynotificationsV1ListNotificationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } } }, - "revision": "20230912", + "revision": "20231203", "rootUrl": "https://advisorynotifications.googleapis.com/", "schemas": { "GoogleCloudAdvisorynotificationsV1Attachment": { @@ -392,7 +490,7 @@ "type": "array" }, "name": { - "description": "The resource name of the notification. Format: organizations/{organization}/locations/{location}/notifications/{notification}.", + "description": "The resource name of the notification. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{project}/locations/{location}/notifications/{notification}.", "type": "string" }, "notificationType": { @@ -440,8 +538,7 @@ "type": "string" }, "name": { - "description": "Output only. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.", - "readOnly": true, + "description": "Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.", "type": "string" }, "notificationSettings": { diff --git a/advisorynotifications/v1/advisorynotifications-gen.go b/advisorynotifications/v1/advisorynotifications-gen.go index 5bb33954ef8..ff8f58c9ad8 100644 --- a/advisorynotifications/v1/advisorynotifications-gen.go +++ b/advisorynotifications/v1/advisorynotifications-gen.go @@ -133,6 +133,7 @@ func New(client *http.Client) (*Service, error) { } s := &Service{client: client, BasePath: basePath} s.Organizations = NewOrganizationsService(s) + s.Projects = NewProjectsService(s) return s, nil } @@ -142,6 +143,8 @@ type Service struct { UserAgent string // optional additional User-Agent fragment Organizations *OrganizationsService + + Projects *ProjectsService } func (s *Service) userAgent() string { @@ -184,6 +187,39 @@ type OrganizationsLocationsNotificationsService struct { s *Service } +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Notifications = NewProjectsLocationsNotificationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Notifications *ProjectsLocationsNotificationsService +} + +func NewProjectsLocationsNotificationsService(s *Service) *ProjectsLocationsNotificationsService { + rs := &ProjectsLocationsNotificationsService{s: s} + return rs +} + +type ProjectsLocationsNotificationsService struct { + s *Service +} + // GoogleCloudAdvisorynotificationsV1Attachment: Attachment with // specific information about the issue. type GoogleCloudAdvisorynotificationsV1Attachment struct { @@ -398,7 +434,8 @@ type GoogleCloudAdvisorynotificationsV1Notification struct { // Name: The resource name of the notification. Format: // organizations/{organization}/locations/{location}/notifications/{notif - // ication}. + // ication} or + // projects/{project}/locations/{location}/notifications/{notification}. Name string `json:"name,omitempty"` // NotificationType: Type of notification @@ -481,7 +518,7 @@ type GoogleCloudAdvisorynotificationsV1Settings struct { // be thrown, and the client should retry the read-modify-write cycle. Etag string `json:"etag,omitempty"` - // Name: Output only. The resource name of the settings to retrieve. + // Name: Identifier. The resource name of the settings to retrieve. // Format: organizations/{organization}/locations/{location}/settings. Name string `json:"name,omitempty"` @@ -756,7 +793,7 @@ type OrganizationsLocationsUpdateSettingsCall struct { // UpdateSettings: Update notification settings. // -// - name: Output only. The resource name of the settings to retrieve. +// - name: Identifier. The resource name of the settings to retrieve. // Format: organizations/{organization}/locations/{location}/settings. func (r *OrganizationsLocationsService) UpdateSettings(name string, googlecloudadvisorynotificationsv1settings *GoogleCloudAdvisorynotificationsV1Settings) *OrganizationsLocationsUpdateSettingsCall { c := &OrganizationsLocationsUpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -867,7 +904,7 @@ func (c *OrganizationsLocationsUpdateSettingsCall) Do(opts ...googleapi.CallOpti // ], // "parameters": { // "name": { - // "description": "Output only. 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.", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/settings$", // "required": true, @@ -903,7 +940,9 @@ type OrganizationsLocationsNotificationsGetCall struct { // // - name: A name of the notification to retrieve. Format: // organizations/{organization}/locations/{location}/notifications/{not -// ification}. +// ification} or +// projects/{projects}/locations/{location}/notifications/{notification +// }. func (r *OrganizationsLocationsNotificationsService) Get(name string) *OrganizationsLocationsNotificationsGetCall { c := &OrganizationsLocationsNotificationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -1036,7 +1075,7 @@ func (c *OrganizationsLocationsNotificationsGetCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "name": { - // "description": "Required. A name of the notification to retrieve. Format: organizations/{organization}/locations/{location}/notifications/{notification}.", + // "description": "Required. A name of the notification to retrieve. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{projects}/locations/{location}/notifications/{notification}.", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/notifications/[^/]+$", // "required": true, @@ -1069,7 +1108,8 @@ type OrganizationsLocationsNotificationsListCall struct { // // - parent: The parent, which owns this collection of notifications. // Must be of the form -// "organizations/{organization}/locations/{location}". +// "organizations/{organization}/locations/{location}" or +// "projects/{project}/locations/{location}". func (r *OrganizationsLocationsNotificationsService) List(parent string) *OrganizationsLocationsNotificationsListCall { c := &OrganizationsLocationsNotificationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -1254,7 +1294,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}\"", + // "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, @@ -1307,3 +1347,426 @@ func (c *OrganizationsLocationsNotificationsListCall) Pages(ctx context.Context, c.PageToken(x.NextPageToken) } } + +// method id "advisorynotifications.projects.locations.notifications.get": + +type ProjectsLocationsNotificationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a notification. +// +// - name: A name of the notification to retrieve. Format: +// organizations/{organization}/locations/{location}/notifications/{not +// ification} or +// projects/{projects}/locations/{location}/notifications/{notification +// }. +func (r *ProjectsLocationsNotificationsService) Get(name string) *ProjectsLocationsNotificationsGetCall { + c := &ProjectsLocationsNotificationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// LanguageCode sets the optional parameter "languageCode": ISO code for +// requested localization language. If unset, will be interpereted as +// "en". If the requested language is valid, but not supported for this +// notification, English will be returned with an "Not applicable" +// LocalizationState. If the ISO code is invalid (i.e. not a real +// language), this RPC will throw an error. +func (c *ProjectsLocationsNotificationsGetCall) LanguageCode(languageCode string) *ProjectsLocationsNotificationsGetCall { + c.urlParams_.Set("languageCode", languageCode) + 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 *ProjectsLocationsNotificationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotificationsGetCall { + 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 *ProjectsLocationsNotificationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotificationsGetCall { + 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 *ProjectsLocationsNotificationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotificationsGetCall { + 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 *ProjectsLocationsNotificationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotificationsGetCall) 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.notifications.get" call. +// Exactly one of *GoogleCloudAdvisorynotificationsV1Notification or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAdvisorynotificationsV1Notification.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 *ProjectsLocationsNotificationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1Notification, 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 := &GoogleCloudAdvisorynotificationsV1Notification{ + 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 notification.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notifications/{notificationsId}", + // "httpMethod": "GET", + // "id": "advisorynotifications.projects.locations.notifications.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "languageCode": { + // "description": "ISO code for requested localization language. If unset, will be interpereted as \"en\". If the requested language is valid, but not supported for this notification, English will be returned with an \"Not applicable\" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. A name of the notification to retrieve. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{projects}/locations/{location}/notifications/{notification}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/notifications/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudAdvisorynotificationsV1Notification" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "advisorynotifications.projects.locations.notifications.list": + +type ProjectsLocationsNotificationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists notifications under a given parent. +// +// - parent: The parent, which owns this collection of notifications. +// Must be of the form +// "organizations/{organization}/locations/{location}" or +// "projects/{project}/locations/{location}". +func (r *ProjectsLocationsNotificationsService) List(parent string) *ProjectsLocationsNotificationsListCall { + c := &ProjectsLocationsNotificationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// LanguageCode sets the optional parameter "languageCode": ISO code for +// requested localization language. If unset, will be interpereted as +// "en". If the requested language is valid, but not supported for this +// notification, English will be returned with an "Not applicable" +// LocalizationState. If the ISO code is invalid (i.e. not a real +// language), this RPC will throw an error. +func (c *ProjectsLocationsNotificationsListCall) LanguageCode(languageCode string) *ProjectsLocationsNotificationsListCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of notifications to return. The service may return fewer than this +// value. If unspecified or equal to 0, at most 50 notifications will be +// returned. The maximum value is 50; values above 50 will be coerced to +// 50. +func (c *ProjectsLocationsNotificationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotificationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// returned from a previous request. When paginating, all other +// parameters provided in the request must match the call that returned +// the page token. +func (c *ProjectsLocationsNotificationsListCall) PageToken(pageToken string) *ProjectsLocationsNotificationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// View sets the optional parameter "view": Specifies which parts of the +// notification resource should be returned in the response. +// +// Possible values: +// +// "NOTIFICATION_VIEW_UNSPECIFIED" - Not specified, equivalent to +// +// BASIC. +// +// "BASIC" - Server responses only include title, creation time and +// +// Notification ID. Note: for internal use responses also include the +// last update time, the latest message text and whether notification +// has attachments. +// +// "FULL" - Include everything. +func (c *ProjectsLocationsNotificationsListCall) View(view string) *ProjectsLocationsNotificationsListCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsNotificationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotificationsListCall { + 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 *ProjectsLocationsNotificationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotificationsListCall { + 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 *ProjectsLocationsNotificationsListCall) Context(ctx context.Context) *ProjectsLocationsNotificationsListCall { + 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 *ProjectsLocationsNotificationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotificationsListCall) 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}/notifications") + 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 "advisorynotifications.projects.locations.notifications.list" call. +// Exactly one of +// *GoogleCloudAdvisorynotificationsV1ListNotificationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAdvisorynotificationsV1ListNotificationsResponse.ServerRes +// ponse.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 *ProjectsLocationsNotificationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1ListNotificationsResponse, 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 := &GoogleCloudAdvisorynotificationsV1ListNotificationsResponse{ + 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 notifications under a given parent.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notifications", + // "httpMethod": "GET", + // "id": "advisorynotifications.projects.locations.notifications.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "languageCode": { + // "description": "ISO code for requested localization language. If unset, will be interpereted as \"en\". If the requested language is valid, but not supported for this notification, English will be returned with an \"Not applicable\" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of notifications to return. The service may return fewer than this value. If unspecified or equal to 0, at most 50 notifications will be returned. The maximum value is 50; values above 50 will be coerced to 50.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token returned from a previous request. When paginating, all other parameters provided in the request must match the call that returned the page token.", + // "location": "query", + // "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}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Specifies which parts of the notification resource should be returned in the response.", + // "enum": [ + // "NOTIFICATION_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "Not specified, equivalent to BASIC.", + // "Server responses only include title, creation time and Notification ID. Note: for internal use responses also include the last update time, the latest message text and whether notification has attachments.", + // "Include everything." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/notifications", + // "response": { + // "$ref": "GoogleCloudAdvisorynotificationsV1ListNotificationsResponse" + // }, + // "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 *ProjectsLocationsNotificationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAdvisorynotificationsV1ListNotificationsResponse) 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) + } +} diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index e4c17299560..3d38c0bfdc3 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -3070,6 +3070,62 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "directPredict": { + "description": "Perform an unary online prediction request for Vertex first-party products and frameworks.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directPredict", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.directPredict", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:directPredict", + "request": { + "$ref": "GoogleCloudAiplatformV1DirectPredictRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1DirectPredictResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "directRawPredict": { + "description": "Perform an online prediction request through gRPC.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directRawPredict", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.directRawPredict", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:directRawPredict", + "request": { + "$ref": "GoogleCloudAiplatformV1DirectRawPredictRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1DirectRawPredictResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "explain": { "description": "Perform an online explanation. If deployed_model_id is specified, the corresponding DeployModel must have explanation_spec populated. If deployed_model_id is not specified, all DeployedModels must have explanation_spec populated.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:explain", @@ -3650,7 +3706,7 @@ ], "parameters": { "name": { - "description": "Output only. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", + "description": "Identifier. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+$", "required": true, @@ -3793,7 +3849,7 @@ "type": "integer" }, "pageToken": { - "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or or FeatureRegistryService.ListFeatures must match the call that provided the page token.", + "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -4257,7 +4313,7 @@ ], "parameters": { "name": { - "description": "Output only. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", + "description": "Identifier. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+$", "required": true, @@ -4457,7 +4513,7 @@ ], "parameters": { "name": { - "description": "Output only. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", + "description": "Identifier. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+$", "required": true, @@ -5760,7 +5816,7 @@ "type": "integer" }, "pageToken": { - "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or or FeatureRegistryService.ListFeatures must match the call that provided the page token.", + "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -10568,6 +10624,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "upgrade": { + "description": "Upgrades a NotebookRuntime.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notebookRuntimes/{notebookRuntimesId}:upgrade", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.notebookRuntimes.upgrade", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:upgrade", + "request": { + "$ref": "GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -14600,7 +14684,7 @@ } } }, - "revision": "20231111", + "revision": "20231129", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -15636,6 +15720,22 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1Blob": { + "description": "Content blob.", + "id": "GoogleCloudAiplatformV1Blob", + "properties": { + "data": { + "description": "Required. Data.", + "format": "byte", + "type": "string" + }, + "mimeType": { + "description": "Required. Mime type of the data.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1BlurBaselineConfig": { "description": "Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383", "id": "GoogleCloudAiplatformV1BlurBaselineConfig", @@ -15861,6 +15961,24 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1Content": { + "description": "A single turn in a conversation with the model.", + "id": "GoogleCloudAiplatformV1Content", + "properties": { + "parts": { + "description": "Required. Ordered parts that make up a message. Parts may have different MIME types.", + "items": { + "$ref": "GoogleCloudAiplatformV1Part" + }, + "type": "array" + }, + "role": { + "description": "Optional. The role in a conversation associated with this content. Set it only if a content represents a turn in a conversations, otherwise no need to set role. Possible values: user, model.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1Context": { "description": "Instance of a general context.", "id": "GoogleCloudAiplatformV1Context", @@ -15981,12 +16099,23 @@ "description": "Request message for PredictionService.CountTokens.", "id": "GoogleCloudAiplatformV1CountTokensRequest", "properties": { + "contents": { + "description": "Required. Input content.", + "items": { + "$ref": "GoogleCloudAiplatformV1Content" + }, + "type": "array" + }, "instances": { "description": "Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.", "items": { "type": "any" }, "type": "array" + }, + "model": { + "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "type": "string" } }, "type": "object" @@ -17112,6 +17241,11 @@ "description": "Immutable. The ID of the DeployedIndex in the above IndexEndpoint.", "type": "string" }, + "displayName": { + "description": "Output only. The display name of the DeployedIndex.", + "readOnly": true, + "type": "string" + }, "indexEndpoint": { "description": "Immutable. A resource name of the IndexEndpoint.", "type": "string" @@ -17174,6 +17308,10 @@ "serviceAccount": { "description": "The service account that the DeployedModel's container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn't have access to the resource project. Users deploying the Model must have the `iam.serviceAccounts.actAs` permission on this service account.", "type": "string" + }, + "sharedResources": { + "description": "The resource name of the shared DeploymentResourcePool to deploy on. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`", + "type": "string" } }, "type": "object" @@ -17228,6 +17366,70 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1DirectPredictRequest": { + "description": "Request message for PredictionService.DirectPredict.", + "id": "GoogleCloudAiplatformV1DirectPredictRequest", + "properties": { + "inputs": { + "description": "The prediction input.", + "items": { + "$ref": "GoogleCloudAiplatformV1Tensor" + }, + "type": "array" + }, + "parameters": { + "$ref": "GoogleCloudAiplatformV1Tensor", + "description": "The parameters that govern the prediction." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1DirectPredictResponse": { + "description": "Response message for PredictionService.DirectPredict.", + "id": "GoogleCloudAiplatformV1DirectPredictResponse", + "properties": { + "outputs": { + "description": "The prediction output.", + "items": { + "$ref": "GoogleCloudAiplatformV1Tensor" + }, + "type": "array" + }, + "parameters": { + "$ref": "GoogleCloudAiplatformV1Tensor", + "description": "The parameters that govern the prediction." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1DirectRawPredictRequest": { + "description": "Request message for PredictionService.DirectRawPredict.", + "id": "GoogleCloudAiplatformV1DirectRawPredictRequest", + "properties": { + "input": { + "description": "The prediction input.", + "format": "byte", + "type": "string" + }, + "methodName": { + "description": "Fully qualified name of the API method being invoked to perform predictions. Format: `/namespace.Service/Method/` Example: `/tensorflow.serving.PredictionService/Predict`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1DirectRawPredictResponse": { + "description": "Response message for PredictionService.DirectRawPredict.", + "id": "GoogleCloudAiplatformV1DirectRawPredictResponse", + "properties": { + "output": { + "description": "The prediction output.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1DiskSpec": { "description": "Represents the spec of disk options.", "id": "GoogleCloudAiplatformV1DiskSpec", @@ -18220,10 +18422,30 @@ "description": "Describes what part of the Dataset is to be exported, the destination of the export and how to export.", "id": "GoogleCloudAiplatformV1ExportDataConfig", "properties": { + "annotationSchemaUri": { + "description": "Only used for custom training data export use cases. Only applicable to Datasets that have DataItems and Annotations. Cloud Storage URI that points to a YAML file describing the annotation schema. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). The schema files that can be used here are found in gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the chosen schema must be consistent with metadata of the Dataset specified by dataset_id. Only Annotations that both match this schema and belong to DataItems not ignored by the split method are used in respectively training, validation or test role, depending on the role of the DataItem they are on. When used in conjunction with annotations_filter, the Annotations used for training are filtered by both annotations_filter and annotation_schema_uri.", + "type": "string" + }, "annotationsFilter": { "description": "An expression for filtering what part of the Dataset is to be exported. Only Annotations that match this filter will be exported. The filter syntax is the same as in ListAnnotations.", "type": "string" }, + "exportUse": { + "description": "Indicates the usage of the exported files.", + "enum": [ + "EXPORT_USE_UNSPECIFIED", + "CUSTOM_CODE_TRAINING" + ], + "enumDescriptions": [ + "Regular user export.", + "Export for custom code training." + ], + "type": "string" + }, + "filterSplit": { + "$ref": "GoogleCloudAiplatformV1ExportFilterSplit", + "description": "Split based on the provided filters for each set." + }, "fractionSplit": { "$ref": "GoogleCloudAiplatformV1ExportFractionSplit", "description": "Split based on fractions defining the size of each set." @@ -18231,6 +18453,10 @@ "gcsDestination": { "$ref": "GoogleCloudAiplatformV1GcsDestination", "description": "The Google Cloud Storage location where the output is to be written to. In the given directory a new directory will be created with name: `export-data--` where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export output will be written into that directory. Inside that directory, annotations with the same schema will be grouped into sub directories which are named with the corresponding annotations' schema title. Inside these sub directories, a schema.yaml will be created to describe the output format." + }, + "savedQueryId": { + "description": "Only used for custom training data export use cases. Only applicable to Datasets that have SavedQueries. The ID of a SavedQuery (annotation set) under the Dataset specified by dataset_id used for filtering Annotations for training. Only Annotations that are associated with this SavedQuery are used in respectively training. When used in conjunction with annotations_filter, the Annotations used for training are filtered by both saved_query_id and annotations_filter. Only one of saved_query_id and annotation_schema_uri should be specified as both of them represent the same thing: problem type.", + "type": "string" } }, "type": "object" @@ -18265,8 +18491,12 @@ "description": "Response message for DatasetService.ExportData.", "id": "GoogleCloudAiplatformV1ExportDataResponse", "properties": { + "dataStats": { + "$ref": "GoogleCloudAiplatformV1ModelDataStats", + "description": "Only present for custom code training export use case. Records data stats, i.e., train/validation/test item/annotation counts calculated during the export operation." + }, "exportedFiles": { - "description": "All of the files that are exported in this export operation.", + "description": "All of the files that are exported in this export operation. For custom code training export, only three (training, validation and test) GCS paths in wildcard format are populated (e.g., gs://.../training-*).", "items": { "type": "string" }, @@ -18356,6 +18586,25 @@ "properties": {}, "type": "object" }, + "GoogleCloudAiplatformV1ExportFilterSplit": { + "description": "Assigns input data to training, validation, and test sets based on the given filters, data pieces not matched by any filter are ignored. Currently only supported for Datasets containing DataItems. If any of the filters in this message are to match nothing, then they can be set as '-' (the minus sign). Supported only for unstructured Datasets.", + "id": "GoogleCloudAiplatformV1ExportFilterSplit", + "properties": { + "testFilter": { + "description": "Required. A filter on DataItems of the Dataset. DataItems that match this filter are used to test the Model. A filter with same syntax as the one used in DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order.", + "type": "string" + }, + "trainingFilter": { + "description": "Required. A filter on DataItems of the Dataset. DataItems that match this filter are used to train the Model. A filter with same syntax as the one used in DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order.", + "type": "string" + }, + "validationFilter": { + "description": "Required. A filter on DataItems of the Dataset. DataItems that match this filter are used to validate the Model. A filter with same syntax as the one used in DatasetService.ListDataItems may be used. If a single DataItem is matched by more than one of the FilterSplit filters, then it is assigned to the first set that applies to it in the training, validation, test order.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1ExportFractionSplit": { "description": "Assigns the input data to training, validation, and test sets as per the given fractions. Any of `training_fraction`, `validation_fraction` and `test_fraction` may optionally be provided, they must sum to up to 1. If the provided ones sum to less than 1, the remainder is assigned to sets as decided by Vertex AI. If none of the fractions are set, by default roughly 80% of data is used for training, 10% for validation, and 10% for test.", "id": "GoogleCloudAiplatformV1ExportFractionSplit", @@ -18601,8 +18850,7 @@ "type": "object" }, "name": { - "description": "Output only. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", - "readOnly": true, + "description": "Identifier. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", "type": "string" }, "updateTime": { @@ -18715,8 +18963,7 @@ "type": "object" }, "name": { - "description": "Output only. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", - "readOnly": true, + "description": "Identifier. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", "type": "string" }, "state": { @@ -18950,8 +19197,7 @@ "type": "object" }, "name": { - "description": "Output only. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", - "readOnly": true, + "description": "Identifier. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", "type": "string" }, "syncConfig": { @@ -19043,8 +19289,7 @@ "readOnly": true }, "name": { - "description": "Output only. Name of the FeatureViewSync. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`", - "readOnly": true, + "description": "Identifier. Name of the FeatureViewSync. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`", "type": "string" }, "runTime": { @@ -19056,6 +19301,7 @@ "type": "object" }, "GoogleCloudAiplatformV1FeatureViewSyncConfig": { + "description": "Configuration for Sync. Only one option is set.", "id": "GoogleCloudAiplatformV1FeatureViewSyncConfig", "properties": { "cron": { @@ -19334,6 +19580,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1FileData": { + "description": "URI based data.", + "id": "GoogleCloudAiplatformV1FileData", + "properties": { + "fileUri": { + "description": "Required. URI.", + "type": "string" + }, + "mimeType": { + "description": "Required. Mime type of the data.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1FilterSplit": { "description": "Assigns input data to training, validation, and test sets based on the given filters, data pieces not matched by any filter are ignored. Currently only supported for Datasets containing DataItems. If any of the filters in this message are to match nothing, then they can be set as '-' (the minus sign). Supported only for unstructured Datasets. ", "id": "GoogleCloudAiplatformV1FilterSplit", @@ -19476,6 +19737,44 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1FunctionCall": { + "description": "A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values.", + "id": "GoogleCloudAiplatformV1FunctionCall", + "properties": { + "args": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details.", + "type": "object" + }, + "name": { + "description": "Required. The name of the function to call. Matches [FunctionDeclaration.name].", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FunctionResponse": { + "description": "The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction.", + "id": "GoogleCloudAiplatformV1FunctionResponse", + "properties": { + "name": { + "description": "Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Required. The function response in JSON object format.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1GcsDestination": { "description": "The Google Cloud Storage location where the output is to be written to.", "id": "GoogleCloudAiplatformV1GcsDestination", @@ -21617,6 +21916,10 @@ "readOnly": true, "type": "string" }, + "dataStats": { + "$ref": "GoogleCloudAiplatformV1ModelDataStats", + "description": "Stats of data used for training or evaluating the Model. Only populated when the Model is trained by a TrainingPipeline with data_input_config." + }, "deployedModels": { "description": "Output only. The pointers to DeployedModels created from this Model. Note that Model could have been deployed to Endpoints in different Locations.", "items": { @@ -21792,7 +22095,7 @@ "type": "array" }, "deploymentTimeout": { - "description": "Immutable. Deployment timeout. TODO (b/306244185): Revise documentation before exposing.", + "description": "Immutable. Deployment timeout. Limit for deployment timeout is 2 hours.", "format": "google-duration", "type": "string" }, @@ -21803,9 +22106,16 @@ }, "type": "array" }, + "grpcPorts": { + "description": "Immutable. List of ports to expose from the container. Vertex AI sends gRPC prediction requests that it receives to the first port on this list. Vertex AI also sends liveness and health checks to this port. If you do not specify this field, gRPC requests to the container will be disabled. Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers v1 core API.", + "items": { + "$ref": "GoogleCloudAiplatformV1Port" + }, + "type": "array" + }, "healthProbe": { "$ref": "GoogleCloudAiplatformV1Probe", - "description": "Immutable. Specification for Kubernetes readiness probe. TODO (b/306244185): Revise documentation before exposing." + "description": "Immutable. Specification for Kubernetes readiness probe." }, "healthRoute": { "description": "Immutable. HTTP path on the container to send health checks to. Vertex AI intermittently sends GET requests to this path on the container's IP address and port to check that the container is healthy. Read more about [health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). For example, if you set this field to `/bar`, then Vertex AI intermittently sends a GET request to the `/bar` path on the port of your container specified by the first value of this `ModelContainerSpec`'s ports field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/ DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)", @@ -21827,13 +22137,50 @@ "type": "string" }, "sharedMemorySizeMb": { - "description": "Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes. TODO (b/306244185): Revise documentation before exposing.", + "description": "Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes.", "format": "int64", "type": "string" }, "startupProbe": { "$ref": "GoogleCloudAiplatformV1Probe", - "description": "Immutable. Specification for Kubernetes startup probe. TODO (b/306244185): Revise documentation before exposing." + "description": "Immutable. Specification for Kubernetes startup probe." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ModelDataStats": { + "description": "Stats of data used for train or evaluate the Model.", + "id": "GoogleCloudAiplatformV1ModelDataStats", + "properties": { + "testAnnotationsCount": { + "description": "Number of Annotations that are used for evaluating this Model. If the Model is evaluated multiple times, this will be the number of test Annotations used by the first evaluation. If the Model is not evaluated, the number is 0.", + "format": "int64", + "type": "string" + }, + "testDataItemsCount": { + "description": "Number of DataItems that were used for evaluating this Model. If the Model is evaluated multiple times, this will be the number of test DataItems used by the first evaluation. If the Model is not evaluated, the number is 0.", + "format": "int64", + "type": "string" + }, + "trainingAnnotationsCount": { + "description": "Number of Annotations that are used for training this Model.", + "format": "int64", + "type": "string" + }, + "trainingDataItemsCount": { + "description": "Number of DataItems that were used for training this Model.", + "format": "int64", + "type": "string" + }, + "validationAnnotationsCount": { + "description": "Number of Annotations that are used for validating this Model during training.", + "format": "int64", + "type": "string" + }, + "validationDataItemsCount": { + "description": "Number of DataItems that were used for validating this Model during training.", + "format": "int64", + "type": "string" } }, "type": "object" @@ -23421,6 +23768,37 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1Part": { + "description": "Content part.", + "id": "GoogleCloudAiplatformV1Part", + "properties": { + "fileData": { + "$ref": "GoogleCloudAiplatformV1FileData", + "description": "Optional. URI based data." + }, + "functionCall": { + "$ref": "GoogleCloudAiplatformV1FunctionCall", + "description": "Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values." + }, + "functionResponse": { + "$ref": "GoogleCloudAiplatformV1FunctionResponse", + "description": "Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model." + }, + "inlineData": { + "$ref": "GoogleCloudAiplatformV1Blob", + "description": "Optional. Inlined bytes data." + }, + "text": { + "description": "Optional. Text part (can be code).", + "type": "string" + }, + "videoMetadata": { + "$ref": "GoogleCloudAiplatformV1VideoMetadata", + "description": "Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest": { "description": "Request message for JobService.PauseModelDeploymentMonitoringJob.", "id": "GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest", @@ -26234,25 +26612,32 @@ "description": "The uri of the Vertex AI Search data source. Deprecated. Use vertex_ai_search_datastore instead.", "type": "string" }, + "inlineContext": { + "description": "The grounding text passed inline with the Predict API. It can support up to 1 million token context.", + "type": "string" + }, "type": { "description": "The type of the grounding checking source.", "enum": [ "UNSPECIFIED", "WEB", "ENTERPRISE", - "VERTEX_AI_SEARCH" + "VERTEX_AI_SEARCH", + "INLINE" ], "enumDeprecated": [ false, false, true, + false, false ], "enumDescriptions": [ "", "Uses Web Search to check the grounding.", "Uses Vertex AI Search to check the grounding. Deprecated. Use VERTEX_AI_SEARCH instead.", - "Uses Vertex AI Search to check the grounding" + "Uses Vertex AI Search to check the grounding", + "Uses inline context to check the grounding." ], "type": "string" }, @@ -26999,6 +27384,10 @@ "format": "int64", "type": "string" }, + "note": { + "description": "User-created prompt note. Note size limit is 2KB.", + "type": "string" + }, "promptType": { "description": "Type of the prompt dataset.", "type": "string" @@ -30809,6 +31198,27 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata": { + "description": "Metadata information for NotebookService.UpgradeNotebookRuntime.", + "id": "GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata", + "properties": { + "genericMetadata": { + "$ref": "GoogleCloudAiplatformV1GenericOperationMetadata", + "description": "The operation generic information." + }, + "progressMessage": { + "description": "A human-readable message that shows the intermediate progress details of NotebookRuntime.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest": { + "description": "Request message for NotebookService.UpgradeNotebookRuntime.", + "id": "GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1UploadModelOperationMetadata": { "description": "Details of ModelService.UploadModel operation.", "id": "GoogleCloudAiplatformV1UploadModelOperationMetadata", @@ -30919,6 +31329,23 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1VideoMetadata": { + "description": "Metadata describes the input video content.", + "id": "GoogleCloudAiplatformV1VideoMetadata", + "properties": { + "endOffset": { + "description": "Optional. The end offset of the video.", + "format": "google-duration", + "type": "string" + }, + "startOffset": { + "description": "Optional. The start offset of the video.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1WorkerPoolSpec": { "description": "Represents the spec of a worker pool in a job.", "id": "GoogleCloudAiplatformV1WorkerPoolSpec", diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index ae8e9b2bf6c..3bca2494c59 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -3230,6 +3230,37 @@ func (s *GoogleCloudAiplatformV1BigQuerySource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1Blob: Content blob. +type GoogleCloudAiplatformV1Blob struct { + // Data: Required. Data. + Data string `json:"data,omitempty"` + + // MimeType: Required. Mime type of the data. + MimeType string `json:"mimeType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Data") 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. "Data") 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 *GoogleCloudAiplatformV1Blob) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Blob + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1BlurBaselineConfig: Config for blur baseline. // When enabled, a linear path from the maximally blurred image to the // input image is created. Using a blurred baseline instead of zero @@ -3647,6 +3678,42 @@ func (s *GoogleCloudAiplatformV1ContainerSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1Content: A single turn in a conversation with +// the model. +type GoogleCloudAiplatformV1Content struct { + // Parts: Required. Ordered parts that make up a message. Parts may have + // different MIME types. + Parts []*GoogleCloudAiplatformV1Part `json:"parts,omitempty"` + + // Role: Optional. The role in a conversation associated with this + // content. Set it only if a content represents a turn in a + // conversations, otherwise no need to set role. Possible values: user, + // model. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Parts") 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. "Parts") 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 *GoogleCloudAiplatformV1Content) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Content + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1Context: Instance of a general context. type GoogleCloudAiplatformV1Context struct { // CreateTime: Output only. Timestamp when this Context was created. @@ -3842,12 +3909,20 @@ func (s *GoogleCloudAiplatformV1CopyModelResponse) MarshalJSON() ([]byte, error) // GoogleCloudAiplatformV1CountTokensRequest: Request message for // PredictionService.CountTokens. type GoogleCloudAiplatformV1CountTokensRequest struct { + // Contents: Required. Input content. + Contents []*GoogleCloudAiplatformV1Content `json:"contents,omitempty"` + // Instances: Required. The instances that are the input to token // counting call. Schema is identical to the prediction schema of the // underlying model. Instances []interface{} `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to + // Model: Required. The name of the publisher model requested to serve + // the prediction. Format: + // `projects/{project}/locations/{location}/publishers/*/models/*` + Model string `json:"model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Contents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3855,7 +3930,7 @@ type GoogleCloudAiplatformV1CountTokensRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in + // NullFields is a list of field names (e.g. "Contents") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6100,6 +6175,9 @@ type GoogleCloudAiplatformV1DeployedIndexRef struct { // IndexEndpoint. DeployedIndexId string `json:"deployedIndexId,omitempty"` + // DisplayName: Output only. The display name of the DeployedIndex. + DisplayName string `json:"displayName,omitempty"` + // IndexEndpoint: Immutable. A resource name of the IndexEndpoint. IndexEndpoint string `json:"indexEndpoint,omitempty"` @@ -6206,6 +6284,12 @@ type GoogleCloudAiplatformV1DeployedModel struct { // permission on this service account. ServiceAccount string `json:"serviceAccount,omitempty"` + // SharedResources: The resource name of the shared + // DeploymentResourcePool to deploy on. Format: + // `projects/{project}/locations/{location}/deploymentResourcePools/{depl + // oyment_resource_pool}` + SharedResources string `json:"sharedResources,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutomaticResources") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -6340,6 +6424,141 @@ func (s *GoogleCloudAiplatformV1DestinationFeatureSetting) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1DirectPredictRequest: Request message for +// PredictionService.DirectPredict. +type GoogleCloudAiplatformV1DirectPredictRequest struct { + // Inputs: The prediction input. + Inputs []*GoogleCloudAiplatformV1Tensor `json:"inputs,omitempty"` + + // Parameters: The parameters that govern the prediction. + Parameters *GoogleCloudAiplatformV1Tensor `json:"parameters,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Inputs") 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. "Inputs") 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 *GoogleCloudAiplatformV1DirectPredictRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1DirectPredictRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1DirectPredictResponse: Response message for +// PredictionService.DirectPredict. +type GoogleCloudAiplatformV1DirectPredictResponse struct { + // Outputs: The prediction output. + Outputs []*GoogleCloudAiplatformV1Tensor `json:"outputs,omitempty"` + + // Parameters: The parameters that govern the prediction. + Parameters *GoogleCloudAiplatformV1Tensor `json:"parameters,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Outputs") 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. "Outputs") 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 *GoogleCloudAiplatformV1DirectPredictResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1DirectPredictResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1DirectRawPredictRequest: Request message for +// PredictionService.DirectRawPredict. +type GoogleCloudAiplatformV1DirectRawPredictRequest struct { + // Input: The prediction input. + Input string `json:"input,omitempty"` + + // MethodName: Fully qualified name of the API method being invoked to + // perform predictions. Format: `/namespace.Service/Method/` Example: + // `/tensorflow.serving.PredictionService/Predict` + MethodName string `json:"methodName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Input") 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. "Input") 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 *GoogleCloudAiplatformV1DirectRawPredictRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1DirectRawPredictRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1DirectRawPredictResponse: Response message for +// PredictionService.DirectRawPredict. +type GoogleCloudAiplatformV1DirectRawPredictResponse struct { + // Output: The prediction output. + Output string `json:"output,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Output") 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. "Output") 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 *GoogleCloudAiplatformV1DirectRawPredictResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1DirectRawPredictResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1DiskSpec: Represents the spec of disk options. type GoogleCloudAiplatformV1DiskSpec struct { // BootDiskSizeGb: Size in GB of the boot disk (default is 100GB). @@ -8049,12 +8268,39 @@ func (s *GoogleCloudAiplatformV1ExplanationSpecOverride) MarshalJSON() ([]byte, // Dataset is to be exported, the destination of the export and how to // export. type GoogleCloudAiplatformV1ExportDataConfig struct { + // AnnotationSchemaUri: Only used for custom training data export use + // cases. Only applicable to Datasets that have DataItems and + // Annotations. Cloud Storage URI that points to a YAML file describing + // the annotation schema. The schema is defined as an OpenAPI 3.0.2 + // Schema Object + // (https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). + // The schema files that can be used here are found in + // gs://google-cloud-aiplatform/schema/dataset/annotation/, note that + // the chosen schema must be consistent with metadata of the Dataset + // specified by dataset_id. Only Annotations that both match this schema + // and belong to DataItems not ignored by the split method are used in + // respectively training, validation or test role, depending on the role + // of the DataItem they are on. When used in conjunction with + // annotations_filter, the Annotations used for training are filtered by + // both annotations_filter and annotation_schema_uri. + AnnotationSchemaUri string `json:"annotationSchemaUri,omitempty"` + // AnnotationsFilter: An expression for filtering what part of the // Dataset is to be exported. Only Annotations that match this filter // will be exported. The filter syntax is the same as in // ListAnnotations. AnnotationsFilter string `json:"annotationsFilter,omitempty"` + // ExportUse: Indicates the usage of the exported files. + // + // Possible values: + // "EXPORT_USE_UNSPECIFIED" - Regular user export. + // "CUSTOM_CODE_TRAINING" - Export for custom code training. + ExportUse string `json:"exportUse,omitempty"` + + // FilterSplit: Split based on the provided filters for each set. + FilterSplit *GoogleCloudAiplatformV1ExportFilterSplit `json:"filterSplit,omitempty"` + // FractionSplit: Split based on fractions defining the size of each // set. FractionSplit *GoogleCloudAiplatformV1ExportFractionSplit `json:"fractionSplit,omitempty"` @@ -8070,7 +8316,19 @@ type GoogleCloudAiplatformV1ExportDataConfig struct { // format. GcsDestination *GoogleCloudAiplatformV1GcsDestination `json:"gcsDestination,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnnotationsFilter") + // SavedQueryId: Only used for custom training data export use cases. + // Only applicable to Datasets that have SavedQueries. The ID of a + // SavedQuery (annotation set) under the Dataset specified by dataset_id + // used for filtering Annotations for training. Only Annotations that + // are associated with this SavedQuery are used in respectively + // training. When used in conjunction with annotations_filter, the + // Annotations used for training are filtered by both saved_query_id and + // annotations_filter. Only one of saved_query_id and + // annotation_schema_uri should be specified as both of them represent + // the same thing: problem type. + SavedQueryId string `json:"savedQueryId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnnotationSchemaUri") // 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 @@ -8078,7 +8336,7 @@ type GoogleCloudAiplatformV1ExportDataConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnnotationsFilter") to + // NullFields is a list of field names (e.g. "AnnotationSchemaUri") 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 @@ -8160,11 +8418,18 @@ func (s *GoogleCloudAiplatformV1ExportDataRequest) MarshalJSON() ([]byte, error) // GoogleCloudAiplatformV1ExportDataResponse: Response message for // DatasetService.ExportData. type GoogleCloudAiplatformV1ExportDataResponse struct { + // DataStats: Only present for custom code training export use case. + // Records data stats, i.e., train/validation/test item/annotation + // counts calculated during the export operation. + DataStats *GoogleCloudAiplatformV1ModelDataStats `json:"dataStats,omitempty"` + // ExportedFiles: All of the files that are exported in this export - // operation. + // operation. For custom code training export, only three (training, + // validation and test) GCS paths in wildcard format are populated + // (e.g., gs://.../training-*). ExportedFiles []string `json:"exportedFiles,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExportedFiles") to + // ForceSendFields is a list of field names (e.g. "DataStats") 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 @@ -8172,10 +8437,10 @@ type GoogleCloudAiplatformV1ExportDataResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExportedFiles") 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 + // NullFields is a list of field names (e.g. "DataStats") 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:"-"` @@ -8342,6 +8607,62 @@ func (s *GoogleCloudAiplatformV1ExportFeatureValuesRequestSnapshotExport) Marsha type GoogleCloudAiplatformV1ExportFeatureValuesResponse struct { } +// GoogleCloudAiplatformV1ExportFilterSplit: Assigns input data to +// training, validation, and test sets based on the given filters, data +// pieces not matched by any filter are ignored. Currently only +// supported for Datasets containing DataItems. If any of the filters in +// this message are to match nothing, then they can be set as '-' (the +// minus sign). Supported only for unstructured Datasets. +type GoogleCloudAiplatformV1ExportFilterSplit struct { + // TestFilter: Required. A filter on DataItems of the Dataset. DataItems + // that match this filter are used to test the Model. A filter with same + // syntax as the one used in DatasetService.ListDataItems may be used. + // If a single DataItem is matched by more than one of the FilterSplit + // filters, then it is assigned to the first set that applies to it in + // the training, validation, test order. + TestFilter string `json:"testFilter,omitempty"` + + // TrainingFilter: Required. A filter on DataItems of the Dataset. + // DataItems that match this filter are used to train the Model. A + // filter with same syntax as the one used in + // DatasetService.ListDataItems may be used. If a single DataItem is + // matched by more than one of the FilterSplit filters, then it is + // assigned to the first set that applies to it in the training, + // validation, test order. + TrainingFilter string `json:"trainingFilter,omitempty"` + + // ValidationFilter: Required. A filter on DataItems of the Dataset. + // DataItems that match this filter are used to validate the Model. A + // filter with same syntax as the one used in + // DatasetService.ListDataItems may be used. If a single DataItem is + // matched by more than one of the FilterSplit filters, then it is + // assigned to the first set that applies to it in the training, + // validation, test order. + ValidationFilter string `json:"validationFilter,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TestFilter") 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. "TestFilter") 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 *GoogleCloudAiplatformV1ExportFilterSplit) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ExportFilterSplit + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1ExportFractionSplit: Assigns the input data to // training, validation, and test sets as per the given fractions. Any // of `training_fraction`, `validation_fraction` and `test_fraction` may @@ -8777,7 +9098,7 @@ type GoogleCloudAiplatformV1FeatureGroup struct { // immutable. Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. Name of the FeatureGroup. Format: + // Name: Identifier. Name of the FeatureGroup. Format: // `projects/{project}/locations/{location}/featureGroups/{featureGroup}` Name string `json:"name,omitempty"` @@ -9001,7 +9322,7 @@ type GoogleCloudAiplatformV1FeatureOnlineStore struct { // "aiplatform.googleapis.com/" and are immutable. Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. Name of the FeatureOnlineStore. Format: + // Name: Identifier. Name of the FeatureOnlineStore. Format: // `projects/{project}/locations/{location}/featureOnlineStores/{featureO // nlineStore}` Name string `json:"name,omitempty"` @@ -9462,7 +9783,7 @@ type GoogleCloudAiplatformV1FeatureView struct { // and are immutable. Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. Name of the FeatureView. Format: + // Name: Identifier. Name of the FeatureView. Format: // `projects/{project}/locations/{location}/featureOnlineStores/{feature_ // online_store}/featureViews/{feature_view}` Name string `json:"name,omitempty"` @@ -9644,7 +9965,7 @@ type GoogleCloudAiplatformV1FeatureViewSync struct { // FinalStatus: Output only. Final status of the FeatureViewSync. FinalStatus *GoogleRpcStatus `json:"finalStatus,omitempty"` - // Name: Output only. Name of the FeatureViewSync. Format: + // Name: Identifier. Name of the FeatureViewSync. Format: // `projects/{project}/locations/{location}/featureOnlineStores/{feature_ // online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_vi // ew_sync}` @@ -9680,6 +10001,8 @@ func (s *GoogleCloudAiplatformV1FeatureViewSync) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1FeatureViewSyncConfig: Configuration for Sync. +// Only one option is set. type GoogleCloudAiplatformV1FeatureViewSyncConfig struct { // Cron: Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch // scheduled runs. To explicitly set a timezone to the cron tab, apply a @@ -10249,6 +10572,37 @@ func (s *GoogleCloudAiplatformV1FetchFeatureValuesResponseFeatureNameValuePairLi return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1FileData: URI based data. +type GoogleCloudAiplatformV1FileData struct { + // FileUri: Required. URI. + FileUri string `json:"fileUri,omitempty"` + + // MimeType: Required. Mime type of the data. + MimeType string `json:"mimeType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileUri") 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. "FileUri") 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 *GoogleCloudAiplatformV1FileData) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FileData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1FilterSplit: Assigns input data to training, // validation, and test sets based on the given filters, data pieces not // matched by any filter are ignored. Currently only supported for @@ -10602,6 +10956,80 @@ func (s *GoogleCloudAiplatformV1FractionSplit) UnmarshalJSON(data []byte) error return nil } +// GoogleCloudAiplatformV1FunctionCall: A predicted [FunctionCall] +// returned from the model that contains a string representing the +// [FunctionDeclaration.name] and a structured JSON object containing +// the parameters and their values. +type GoogleCloudAiplatformV1FunctionCall struct { + // Args: Optional. Required. The function parameters and values in JSON + // object format. See [FunctionDeclaration.parameters] for parameter + // details. + Args googleapi.RawMessage `json:"args,omitempty"` + + // Name: Required. The name of the function to call. Matches + // [FunctionDeclaration.name]. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Args") 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. "Args") 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 *GoogleCloudAiplatformV1FunctionCall) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FunctionCall + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1FunctionResponse: The result output from a +// [FunctionCall] that contains a string representing the +// [FunctionDeclaration.name] and a structured JSON object containing +// any output from the function is used as context to the model. This +// should contain the result of a [FunctionCall] made based on model +// prediction. +type GoogleCloudAiplatformV1FunctionResponse struct { + // Name: Required. The name of the function to call. Matches + // [FunctionDeclaration.name] and [FunctionCall.name]. + Name string `json:"name,omitempty"` + + // Response: Required. The function response in JSON object format. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1FunctionResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FunctionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1GcsDestination: The Google Cloud Storage // location where the output is to be written to. type GoogleCloudAiplatformV1GcsDestination struct { @@ -14625,6 +15053,11 @@ type GoogleCloudAiplatformV1Model struct { // Vertex AI. CreateTime string `json:"createTime,omitempty"` + // DataStats: Stats of data used for training or evaluating the Model. + // Only populated when the Model is trained by a TrainingPipeline with + // data_input_config. + DataStats *GoogleCloudAiplatformV1ModelDataStats `json:"dataStats,omitempty"` + // DeployedModels: Output only. The pointers to DeployedModels created // from this Model. Note that Model could have been deployed to // Endpoints in different Locations. @@ -14913,8 +15346,8 @@ type GoogleCloudAiplatformV1ModelContainerSpec struct { // (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). Command []string `json:"command,omitempty"` - // DeploymentTimeout: Immutable. Deployment timeout. TODO (b/306244185): - // Revise documentation before exposing. + // DeploymentTimeout: Immutable. Deployment timeout. Limit for + // deployment timeout is 2 hours. DeploymentTimeout string `json:"deploymentTimeout,omitempty"` // Env: Immutable. List of environment variables to set in the @@ -14931,8 +15364,16 @@ type GoogleCloudAiplatformV1ModelContainerSpec struct { // (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). Env []*GoogleCloudAiplatformV1EnvVar `json:"env,omitempty"` + // GrpcPorts: Immutable. List of ports to expose from the container. + // Vertex AI sends gRPC prediction requests that it receives to the + // first port on this list. Vertex AI also sends liveness and health + // checks to this port. If you do not specify this field, gRPC requests + // to the container will be disabled. Vertex AI does not use ports other + // than the first one listed. This field corresponds to the `ports` + // field of the Kubernetes Containers v1 core API. + GrpcPorts []*GoogleCloudAiplatformV1Port `json:"grpcPorts,omitempty"` + // HealthProbe: Immutable. Specification for Kubernetes readiness probe. - // TODO (b/306244185): Revise documentation before exposing. HealthProbe *GoogleCloudAiplatformV1Probe `json:"healthProbe,omitempty"` // HealthRoute: Immutable. HTTP path on the container to send health @@ -15011,12 +15452,10 @@ type GoogleCloudAiplatformV1ModelContainerSpec struct { PredictRoute string `json:"predictRoute,omitempty"` // SharedMemorySizeMb: Immutable. The amount of the VM memory to reserve - // as the shared memory for the model in megabytes. TODO (b/306244185): - // Revise documentation before exposing. + // as the shared memory for the model in megabytes. SharedMemorySizeMb int64 `json:"sharedMemorySizeMb,omitempty,string"` // StartupProbe: Immutable. Specification for Kubernetes startup probe. - // TODO (b/306244185): Revise documentation before exposing. StartupProbe *GoogleCloudAiplatformV1Probe `json:"startupProbe,omitempty"` // ForceSendFields is a list of field names (e.g. "Args") to @@ -15042,6 +15481,62 @@ func (s *GoogleCloudAiplatformV1ModelContainerSpec) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1ModelDataStats: Stats of data used for train +// or evaluate the Model. +type GoogleCloudAiplatformV1ModelDataStats struct { + // TestAnnotationsCount: Number of Annotations that are used for + // evaluating this Model. If the Model is evaluated multiple times, this + // will be the number of test Annotations used by the first evaluation. + // If the Model is not evaluated, the number is 0. + TestAnnotationsCount int64 `json:"testAnnotationsCount,omitempty,string"` + + // TestDataItemsCount: Number of DataItems that were used for evaluating + // this Model. If the Model is evaluated multiple times, this will be + // the number of test DataItems used by the first evaluation. If the + // Model is not evaluated, the number is 0. + TestDataItemsCount int64 `json:"testDataItemsCount,omitempty,string"` + + // TrainingAnnotationsCount: Number of Annotations that are used for + // training this Model. + TrainingAnnotationsCount int64 `json:"trainingAnnotationsCount,omitempty,string"` + + // TrainingDataItemsCount: Number of DataItems that were used for + // training this Model. + TrainingDataItemsCount int64 `json:"trainingDataItemsCount,omitempty,string"` + + // ValidationAnnotationsCount: Number of Annotations that are used for + // validating this Model during training. + ValidationAnnotationsCount int64 `json:"validationAnnotationsCount,omitempty,string"` + + // ValidationDataItemsCount: Number of DataItems that were used for + // validating this Model during training. + ValidationDataItemsCount int64 `json:"validationDataItemsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "TestAnnotationsCount") 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. "TestAnnotationsCount") 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 *GoogleCloudAiplatformV1ModelDataStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ModelDataStats + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1ModelDeploymentMonitoringBigQueryTable: // ModelDeploymentMonitoringBigQueryTable specifies the BigQuery table // name as well as some information of the logs stored in this table. @@ -17640,6 +18135,56 @@ func (s *GoogleCloudAiplatformV1NotebookRuntimeTemplateRef) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1Part: Content part. +type GoogleCloudAiplatformV1Part struct { + // FileData: Optional. URI based data. + FileData *GoogleCloudAiplatformV1FileData `json:"fileData,omitempty"` + + // FunctionCall: Optional. A predicted [FunctionCall] returned from the + // model that contains a string representing the + // [FunctionDeclaration.name] with the parameters and their values. + FunctionCall *GoogleCloudAiplatformV1FunctionCall `json:"functionCall,omitempty"` + + // FunctionResponse: Optional. The result output of a [FunctionCall] + // that contains a string representing the [FunctionDeclaration.name] + // and a structured JSON object containing any output from the function + // call. It is used as context to the model. + FunctionResponse *GoogleCloudAiplatformV1FunctionResponse `json:"functionResponse,omitempty"` + + // InlineData: Optional. Inlined bytes data. + InlineData *GoogleCloudAiplatformV1Blob `json:"inlineData,omitempty"` + + // Text: Optional. Text part (can be code). + Text string `json:"text,omitempty"` + + // VideoMetadata: Optional. Video metadata. The metadata should only be + // specified while the video data is presented in inline_data or + // file_data. + VideoMetadata *GoogleCloudAiplatformV1VideoMetadata `json:"videoMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileData") 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. "FileData") 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 *GoogleCloudAiplatformV1Part) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Part + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest: // Request message for JobService.PauseModelDeploymentMonitoringJob. type GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest struct { @@ -22927,6 +23472,10 @@ type GoogleCloudAiplatformV1SchemaPredictParamsGroundingConfigSourceEntry struct // Deprecated. Use vertex_ai_search_datastore instead. EnterpriseDatastore string `json:"enterpriseDatastore,omitempty"` + // InlineContext: The grounding text passed inline with the Predict API. + // It can support up to 1 million token context. + InlineContext string `json:"inlineContext,omitempty"` + // Type: The type of the grounding checking source. // // Possible values: @@ -22935,6 +23484,7 @@ type GoogleCloudAiplatformV1SchemaPredictParamsGroundingConfigSourceEntry struct // "ENTERPRISE" - Uses Vertex AI Search to check the grounding. // Deprecated. Use VERTEX_AI_SEARCH instead. // "VERTEX_AI_SEARCH" - Uses Vertex AI Search to check the grounding + // "INLINE" - Uses inline context to check the grounding. Type string `json:"type,omitempty"` // VertexAiSearchDatastore: The uri of the Vertex AI Search data source. @@ -24524,6 +25074,9 @@ type GoogleCloudAiplatformV1SchemaTextPromptDatasetMetadata struct { // when the dataset was saved. MaxOutputTokens int64 `json:"maxOutputTokens,omitempty,string"` + // Note: User-created prompt note. Note size limit is 2KB. + Note string `json:"note,omitempty"` + // PromptType: Type of the prompt dataset. PromptType string `json:"promptType,omitempty"` @@ -31957,6 +32510,45 @@ func (s *GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata: +// Metadata information for NotebookService.UpgradeNotebookRuntime. +type GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + + // ProgressMessage: A human-readable message that shows the intermediate + // progress details of NotebookRuntime. + ProgressMessage string `json:"progressMessage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 *GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest: Request message +// for NotebookService.UpgradeNotebookRuntime. +type GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest struct { +} + // GoogleCloudAiplatformV1UploadModelOperationMetadata: Details of // ModelService.UploadModel operation. type GoogleCloudAiplatformV1UploadModelOperationMetadata struct { @@ -32199,6 +32791,38 @@ func (s *GoogleCloudAiplatformV1Value) UnmarshalJSON(data []byte) error { return nil } +// GoogleCloudAiplatformV1VideoMetadata: Metadata describes the input +// video content. +type GoogleCloudAiplatformV1VideoMetadata struct { + // EndOffset: Optional. The end offset of the video. + EndOffset string `json:"endOffset,omitempty"` + + // StartOffset: Optional. The start offset of the video. + StartOffset string `json:"startOffset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndOffset") 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. "EndOffset") 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 *GoogleCloudAiplatformV1VideoMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VideoMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1WorkerPoolSpec: Represents the spec of a // worker pool in a job. type GoogleCloudAiplatformV1WorkerPoolSpec struct { @@ -46859,30 +47483,308 @@ func (c *ProjectsLocationsEndpointsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates an Endpoint.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints", + // "description": "Creates an Endpoint.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.endpoints.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "endpointId": { + // "description": "Immutable. The ID to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this ID. If the first character is a letter, this value may be up to 63 characters, and valid characters are `[a-z0-9-]`. The last character must be a letter or number. If the first character is a number, this value may be up to 9 characters, and valid characters are `[0-9]` with no leading zeros. When using HTTP/JSON, this field is populated based on a query string argument, such as `?endpoint_id=12345`. This is the fallback for fields that are not included in either the URI or the body.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the Location to create the Endpoint in. Format: `projects/{project}/locations/{location}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/endpoints", + // "request": { + // "$ref": "GoogleCloudAiplatformV1Endpoint" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.endpoints.delete": + +type ProjectsLocationsEndpointsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an Endpoint. +// +// - name: The name of the Endpoint resource to be deleted. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) Delete(name string) *ProjectsLocationsEndpointsDeleteCall { + c := &ProjectsLocationsEndpointsDeleteCall{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 *ProjectsLocationsEndpointsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeleteCall { + 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 *ProjectsLocationsEndpointsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeleteCall { + 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 *ProjectsLocationsEndpointsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an Endpoint.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}", + // "httpMethod": "DELETE", + // "id": "aiplatform.projects.locations.endpoints.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Endpoint resource to be deleted. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.endpoints.deployModel": + +type ProjectsLocationsEndpointsDeployModelCall struct { + s *Service + endpoint string + googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DeployModel: Deploys a Model into this Endpoint, creating a +// DeployedModel within it. +// +// - endpoint: The name of the Endpoint resource into which to deploy a +// Model. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) DeployModel(endpoint string, googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest) *ProjectsLocationsEndpointsDeployModelCall { + c := &ProjectsLocationsEndpointsDeployModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1deploymodelrequest = googlecloudaiplatformv1deploymodelrequest + 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 *ProjectsLocationsEndpointsDeployModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeployModelCall { + 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 *ProjectsLocationsEndpointsDeployModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeployModelCall { + 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 *ProjectsLocationsEndpointsDeployModelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsDeployModelCall) 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.googlecloudaiplatformv1deploymodelrequest) + 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/{+endpoint}:deployModel") + 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.deployModel" 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 *ProjectsLocationsEndpointsDeployModelCall) 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": "Deploys a Model into this Endpoint, creating a DeployedModel within it.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:deployModel", // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.endpoints.create", + // "id": "aiplatform.projects.locations.endpoints.deployModel", // "parameterOrder": [ - // "parent" + // "endpoint" // ], // "parameters": { - // "endpointId": { - // "description": "Immutable. The ID to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this ID. If the first character is a letter, this value may be up to 63 characters, and valid characters are `[a-z0-9-]`. The last character must be a letter or number. If the first character is a number, this value may be up to 9 characters, and valid characters are `[0-9]` with no leading zeros. When using HTTP/JSON, this field is populated based on a query string argument, such as `?endpoint_id=12345`. This is the fallback for fields that are not included in either the URI or the body.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the Location to create the Endpoint in. Format: `projects/{project}/locations/{location}`", + // "endpoint": { + // "description": "Required. The name of the Endpoint resource into which to deploy a Model. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/endpoints", + // "path": "v1/{+endpoint}:deployModel", // "request": { - // "$ref": "GoogleCloudAiplatformV1Endpoint" + // "$ref": "GoogleCloudAiplatformV1DeployModelRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -46894,30 +47796,34 @@ func (c *ProjectsLocationsEndpointsCreateCall) Do(opts ...googleapi.CallOption) } -// method id "aiplatform.projects.locations.endpoints.delete": +// method id "aiplatform.projects.locations.endpoints.directPredict": -type ProjectsLocationsEndpointsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsDirectPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1directpredictrequest *GoogleCloudAiplatformV1DirectPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an Endpoint. +// DirectPredict: Perform an unary online prediction request for Vertex +// first-party products and frameworks. // -// - name: The name of the Endpoint resource to be deleted. Format: +// - endpoint: The name of the Endpoint requested to serve the +// prediction. Format: // `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) Delete(name string) *ProjectsLocationsEndpointsDeleteCall { - c := &ProjectsLocationsEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +func (r *ProjectsLocationsEndpointsService) DirectPredict(endpoint string, googlecloudaiplatformv1directpredictrequest *GoogleCloudAiplatformV1DirectPredictRequest) *ProjectsLocationsEndpointsDirectPredictCall { + c := &ProjectsLocationsEndpointsDirectPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1directpredictrequest = googlecloudaiplatformv1directpredictrequest 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 *ProjectsLocationsEndpointsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeleteCall { +func (c *ProjectsLocationsEndpointsDirectPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -46925,21 +47831,21 @@ func (c *ProjectsLocationsEndpointsDeleteCall) Fields(s ...googleapi.Field) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsEndpointsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeleteCall { +func (c *ProjectsLocationsEndpointsDirectPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectPredictCall { 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 *ProjectsLocationsEndpointsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsDirectPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsDirectPredictCall) 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_ { @@ -46947,29 +47853,36 @@ func (c *ProjectsLocationsEndpointsDeleteCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1directpredictrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:directPredict") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "aiplatform.projects.locations.endpoints.directPredict" call. +// Exactly one of *GoogleCloudAiplatformV1DirectPredictResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAiplatformV1DirectPredictResponse.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 *ProjectsLocationsEndpointsDirectPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DirectPredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46988,7 +47901,7 @@ func (c *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1DirectPredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47000,25 +47913,28 @@ func (c *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes an Endpoint.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}", - // "httpMethod": "DELETE", - // "id": "aiplatform.projects.locations.endpoints.delete", + // "description": "Perform an unary online prediction request for Vertex first-party products and frameworks.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directPredict", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.endpoints.directPredict", // "parameterOrder": [ - // "name" + // "endpoint" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the Endpoint resource to be deleted. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + // "endpoint": { + // "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+endpoint}:directPredict", + // "request": { + // "$ref": "GoogleCloudAiplatformV1DirectPredictRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudAiplatformV1DirectPredictResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -47027,34 +47943,33 @@ func (c *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "aiplatform.projects.locations.endpoints.deployModel": +// method id "aiplatform.projects.locations.endpoints.directRawPredict": -type ProjectsLocationsEndpointsDeployModelCall struct { - s *Service - endpoint string - googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsDirectRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1directrawpredictrequest *GoogleCloudAiplatformV1DirectRawPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DeployModel: Deploys a Model into this Endpoint, creating a -// DeployedModel within it. +// DirectRawPredict: Perform an online prediction request through gRPC. // -// - endpoint: The name of the Endpoint resource into which to deploy a -// Model. Format: +// - endpoint: The name of the Endpoint requested to serve the +// prediction. Format: // `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) DeployModel(endpoint string, googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest) *ProjectsLocationsEndpointsDeployModelCall { - c := &ProjectsLocationsEndpointsDeployModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEndpointsService) DirectRawPredict(endpoint string, googlecloudaiplatformv1directrawpredictrequest *GoogleCloudAiplatformV1DirectRawPredictRequest) *ProjectsLocationsEndpointsDirectRawPredictCall { + c := &ProjectsLocationsEndpointsDirectRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.endpoint = endpoint - c.googlecloudaiplatformv1deploymodelrequest = googlecloudaiplatformv1deploymodelrequest + c.googlecloudaiplatformv1directrawpredictrequest = googlecloudaiplatformv1directrawpredictrequest 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 *ProjectsLocationsEndpointsDeployModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeployModelCall { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectRawPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -47062,21 +47977,21 @@ func (c *ProjectsLocationsEndpointsDeployModelCall) Fields(s ...googleapi.Field) // 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 *ProjectsLocationsEndpointsDeployModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeployModelCall { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectRawPredictCall { 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 *ProjectsLocationsEndpointsDeployModelCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsDeployModelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) 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_ { @@ -47084,14 +47999,14 @@ func (c *ProjectsLocationsEndpointsDeployModelCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deploymodelrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1directrawpredictrequest) 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/{+endpoint}:deployModel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:directRawPredict") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -47104,14 +48019,18 @@ func (c *ProjectsLocationsEndpointsDeployModelCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.deployModel" 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 *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "aiplatform.projects.locations.endpoints.directRawPredict" call. +// Exactly one of *GoogleCloudAiplatformV1DirectRawPredictResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAiplatformV1DirectRawPredictResponse.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 *ProjectsLocationsEndpointsDirectRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DirectRawPredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47130,7 +48049,7 @@ func (c *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1DirectRawPredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47142,28 +48061,28 @@ func (c *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Deploys a Model into this Endpoint, creating a DeployedModel within it.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:deployModel", + // "description": "Perform an online prediction request through gRPC.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directRawPredict", // "httpMethod": "POST", - // "id": "aiplatform.projects.locations.endpoints.deployModel", + // "id": "aiplatform.projects.locations.endpoints.directRawPredict", // "parameterOrder": [ // "endpoint" // ], // "parameters": { // "endpoint": { - // "description": "Required. The name of the Endpoint resource into which to deploy a Model. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + // "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+endpoint}:deployModel", + // "path": "v1/{+endpoint}:directRawPredict", // "request": { - // "$ref": "GoogleCloudAiplatformV1DeployModelRequest" + // "$ref": "GoogleCloudAiplatformV1DirectRawPredictRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudAiplatformV1DirectRawPredictResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -50089,7 +51008,7 @@ type ProjectsLocationsFeatureGroupsPatchCall struct { // Patch: Updates the parameters of a single FeatureGroup. // -// - name: Output only. Name of the FeatureGroup. Format: +// - name: Identifier. Name of the FeatureGroup. Format: // `projects/{project}/locations/{location}/featureGroups/{featureGroup // }`. func (r *ProjectsLocationsFeatureGroupsService) Patch(name string, googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup) *ProjectsLocationsFeatureGroupsPatchCall { @@ -50212,7 +51131,7 @@ func (c *ProjectsLocationsFeatureGroupsPatchCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "name": { - // "description": "Output only. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", + // "description": "Identifier. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+$", // "required": true, @@ -50766,7 +51685,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageSize(pageSize int64 // received from a previous FeaturestoreService.ListFeatures call or // FeatureRegistryService.ListFeatures call. Provide this to retrieve // the subsequent page. When paginating, all other parameters provided -// to FeaturestoreService.ListFeatures or or +// to FeaturestoreService.ListFeatures or // FeatureRegistryService.ListFeatures must match the call that provided // the page token. func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsFeaturesListCall { @@ -50913,7 +51832,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Do(opts ...googleapi.Ca // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or or FeatureRegistryService.ListFeatures must match the call that provided the page token.", + // "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must match the call that provided the page token.", // "location": "query", // "type": "string" // }, @@ -53136,7 +54055,7 @@ type ProjectsLocationsFeatureOnlineStoresPatchCall struct { // Patch: Updates the parameters of a single FeatureOnlineStore. // -// - name: Output only. Name of the FeatureOnlineStore. Format: +// - name: Identifier. Name of the FeatureOnlineStore. Format: // `projects/{project}/locations/{location}/featureOnlineStores/{featur // eOnlineStore}`. func (r *ProjectsLocationsFeatureOnlineStoresService) Patch(name string, googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore) *ProjectsLocationsFeatureOnlineStoresPatchCall { @@ -53260,7 +54179,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "name": { - // "description": "Output only. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", + // "description": "Identifier. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+$", // "required": true, @@ -54147,7 +55066,7 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall struct { // Patch: Updates the parameters of a single FeatureView. // -// - name: Output only. Name of the FeatureView. Format: +// - name: Identifier. Name of the FeatureView. Format: // `projects/{project}/locations/{location}/featureOnlineStores/{featur // e_online_store}/featureViews/{feature_view}`. func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Patch(name string, googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { @@ -54270,7 +55189,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Do(opts ...g // ], // "parameters": { // "name": { - // "description": "Output only. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", + // "description": "Identifier. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+$", // "required": true, @@ -60788,7 +61707,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageSize(pag // received from a previous FeaturestoreService.ListFeatures call or // FeatureRegistryService.ListFeatures call. Provide this to retrieve // the subsequent page. When paginating, all other parameters provided -// to FeaturestoreService.ListFeatures or or +// to FeaturestoreService.ListFeatures or // FeatureRegistryService.ListFeatures must match the call that provided // the page token. func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { @@ -60935,7 +61854,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...g // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or or FeatureRegistryService.ListFeatures must match the call that provided the page token.", + // "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must match the call that provided the page token.", // "location": "query", // "type": "string" // }, @@ -85444,6 +86363,151 @@ func (c *ProjectsLocationsNotebookRuntimesStartCall) Do(opts ...googleapi.CallOp } +// method id "aiplatform.projects.locations.notebookRuntimes.upgrade": + +type ProjectsLocationsNotebookRuntimesUpgradeCall struct { + s *Service + name string + googlecloudaiplatformv1upgradenotebookruntimerequest *GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Upgrade: Upgrades a NotebookRuntime. +// +// - name: The name of the NotebookRuntime resource to be upgrade. +// Instead of checking whether the name is in valid NotebookRuntime +// resource name format, directly throw NotFound exception if there is +// no such NotebookRuntime in spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Upgrade(name string, googlecloudaiplatformv1upgradenotebookruntimerequest *GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesUpgradeCall { + c := &ProjectsLocationsNotebookRuntimesUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1upgradenotebookruntimerequest = googlecloudaiplatformv1upgradenotebookruntimerequest + 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 *ProjectsLocationsNotebookRuntimesUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesUpgradeCall { + 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 *ProjectsLocationsNotebookRuntimesUpgradeCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesUpgradeCall { + 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 *ProjectsLocationsNotebookRuntimesUpgradeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) 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.googlecloudaiplatformv1upgradenotebookruntimerequest) + 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}:upgrade") + 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.notebookRuntimes.upgrade" 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 *ProjectsLocationsNotebookRuntimesUpgradeCall) 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": "Upgrades a NotebookRuntime.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notebookRuntimes/{notebookRuntimesId}:upgrade", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.notebookRuntimes.upgrade", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:upgrade", + // "request": { + // "$ref": "GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.operations.cancel": type ProjectsLocationsOperationsCancelCall struct { diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index 3c4e3228310..31fd05ccb0b 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -3225,6 +3225,62 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "directPredict": { + "description": "Perform an unary online prediction request for Vertex first-party products and frameworks.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directPredict", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.directPredict", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:directPredict", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1DirectPredictRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1DirectPredictResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "directRawPredict": { + "description": "Perform an online prediction request through gRPC.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directRawPredict", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.directRawPredict", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:directRawPredict", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1DirectRawPredictRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1DirectRawPredictResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "explain": { "description": "Perform an online explanation. If deployed_model_id is specified, the corresponding DeployModel must have explanation_spec populated. If deployed_model_id is not specified, all DeployedModels must have explanation_spec populated.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:explain", @@ -3530,6 +3586,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "streamGenerateContent": { + "description": "Generate content with multimodal inputs with streaming support.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:streamGenerateContent", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.streamGenerateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+model}:streamGenerateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:testIamPermissions", @@ -3744,6 +3828,161 @@ } } }, + "exampleStores": { + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.exampleStores.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:cancel", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "aiplatform.projects.locations.exampleStores.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.exampleStores.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.exampleStores.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "wait": { + "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}:wait", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.exampleStores.operations.wait", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to wait on.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + }, + "timeout": { + "description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", + "format": "google-duration", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}:wait", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "extensionControllers": { "resources": { "operations": { @@ -4355,7 +4594,7 @@ ], "parameters": { "name": { - "description": "Output only. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", + "description": "Identifier. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+$", "required": true, @@ -4498,7 +4737,7 @@ "type": "integer" }, "pageToken": { - "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or or FeatureRegistryService.ListFeatures must match the call that provided the page token.", + "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -4962,7 +5201,7 @@ ], "parameters": { "name": { - "description": "Output only. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", + "description": "Identifier. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+$", "required": true, @@ -5162,7 +5401,7 @@ ], "parameters": { "name": { - "description": "Output only. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", + "description": "Identifier. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+$", "required": true, @@ -6487,7 +6726,7 @@ "type": "integer" }, "pageToken": { - "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or or FeatureRegistryService.ListFeatures must match the call that provided the page token.", + "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must match the call that provided the page token.", "location": "query", "type": "string" }, @@ -11651,6 +11890,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "upgrade": { + "description": "Upgrades a NotebookRuntime.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/notebookRuntimes/{notebookRuntimesId}:upgrade", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.notebookRuntimes.upgrade", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:upgrade", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -12117,6 +12384,34 @@ }, "pipelineJobs": { "methods": { + "batchCancel": { + "description": "Batch cancel PipelineJobs. Firstly the server will check if all the jobs are in non-terminal states, and skip the jobs that are already terminated. If the operation failed, none of the pipeline jobs are cancelled. The server will poll the states of all the pipeline jobs periodically to check the cancellation status. This operation will return an LRO.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/pipelineJobs:batchCancel", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.pipelineJobs.batchCancel", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the PipelineJobs' parent resource. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/pipelineJobs:batchCancel", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1BatchCancelPipelineJobsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "batchDelete": { "description": "Batch deletes PipelineJobs The Operation is atomic. If it fails, none of the PipelineJobs are deleted. If it succeeds, all of the PipelineJobs are deleted.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/pipelineJobs:batchDelete", @@ -12606,6 +12901,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamGenerateContent": { + "description": "Generate content with multimodal inputs with streaming support.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:streamGenerateContent", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.publishers.models.streamGenerateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+model}:streamGenerateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } } @@ -16178,7 +16501,7 @@ } } }, - "revision": "20231111", + "revision": "20231129", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -16595,6 +16918,20 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1BatchCancelPipelineJobsRequest": { + "description": "Request message for PipelineService.BatchCancelPipelineJobs.", + "id": "GoogleCloudAiplatformV1beta1BatchCancelPipelineJobsRequest", + "properties": { + "names": { + "description": "Required. The names of the PipelineJobs to cancel. A maximum of 32 PipelineJobs can be cancelled in a batch. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1BatchCreateFeaturesOperationMetadata": { "description": "Details of operations that perform batch create Features.", "id": "GoogleCloudAiplatformV1beta1BatchCreateFeaturesOperationMetadata", @@ -17244,6 +17581,22 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Blob": { + "description": "Content blob.", + "id": "GoogleCloudAiplatformV1beta1Blob", + "properties": { + "data": { + "description": "Required. Data.", + "format": "byte", + "type": "string" + }, + "mimeType": { + "description": "Required. Mime type of the data.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1BlurBaselineConfig": { "description": "Config for blur baseline. When enabled, a linear path from the maximally blurred image to the input image is created. Using a blurred baseline instead of zero (black image) is motivated by the BlurIG approach explained here: https://arxiv.org/abs/2004.03383", "id": "GoogleCloudAiplatformV1beta1BlurBaselineConfig", @@ -17312,6 +17665,63 @@ "properties": {}, "type": "object" }, + "GoogleCloudAiplatformV1beta1Candidate": { + "description": "Generated candidate.", + "id": "GoogleCloudAiplatformV1beta1Candidate", + "properties": { + "citationMetadata": { + "$ref": "GoogleCloudAiplatformV1beta1CitationMetadata", + "description": "Output only. Source attribution of the generated content.", + "readOnly": true + }, + "content": { + "$ref": "GoogleCloudAiplatformV1beta1Content", + "description": "Output only. Content parts of the candidate.", + "readOnly": true + }, + "finishMessage": { + "description": "Output only. A string that describes the filtering behavior in more detail. Only filled when reason is set.", + "readOnly": true, + "type": "string" + }, + "finishReason": { + "description": "Output only. The reason why the model stopped generating tokens.", + "enum": [ + "FINISH_REASON_UNSPECIFIED", + "STOP", + "MAX_TOKENS", + "SAFETY", + "RECITATION", + "OTHER" + ], + "enumDescriptions": [ + "The finish reason is unspecified.", + "Natural stop point of the model or provided stop sequence.", + "The maximum number of tokens as specified in the request was reached.", + "The token generation was stopped as the response was flagged for safety reasons. NOTE: When streaming the Candidate.content will be empty if content filters blocked the output.", + "The token generation was stopped as the response was flagged for unauthorized citations.", + "All other reasons that stopped the token generation" + ], + "readOnly": true, + "type": "string" + }, + "index": { + "description": "Output only. Index of the candidate.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "safetyRatings": { + "description": "Output only. Safety ratings of the generated content.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1SafetyRating" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1CheckTrialEarlyStoppingStateMetatdata": { "description": "This message will be placed in the metadata field of a google.longrunning.Operation associated with a CheckTrialEarlyStoppingState request.", "id": "GoogleCloudAiplatformV1beta1CheckTrialEarlyStoppingStateMetatdata", @@ -17348,6 +17758,60 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Citation": { + "description": "Source attributions for content.", + "id": "GoogleCloudAiplatformV1beta1Citation", + "properties": { + "endIndex": { + "description": "Output only. End index into the content.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "license": { + "description": "Output only. License of the attribution.", + "readOnly": true, + "type": "string" + }, + "publicationDate": { + "$ref": "GoogleTypeDate", + "description": "Output only. Publication date of the attribution.", + "readOnly": true + }, + "startIndex": { + "description": "Output only. Start index into the content.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "title": { + "description": "Output only. Title of the attribution.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. Url reference of the attribution.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1CitationMetadata": { + "description": "A collection of source attributions for a piece of content.", + "id": "GoogleCloudAiplatformV1beta1CitationMetadata", + "properties": { + "citations": { + "description": "Output only. List of citations.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Citation" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1CompleteTrialRequest": { "description": "Request message for VizierService.CompleteTrial.", "id": "GoogleCloudAiplatformV1beta1CompleteTrialRequest", @@ -17469,6 +17933,24 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Content": { + "description": "A single turn in a conversation with the model.", + "id": "GoogleCloudAiplatformV1beta1Content", + "properties": { + "parts": { + "description": "Required. Ordered parts that make up a message. Parts may have different MIME types.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Part" + }, + "type": "array" + }, + "role": { + "description": "Optional. The role in a conversation associated with this content. Set it only if a content represents a turn in a conversations, otherwise no need to set role. Possible values: user, model.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Context": { "description": "Instance of a general context.", "id": "GoogleCloudAiplatformV1beta1Context", @@ -17589,12 +18071,23 @@ "description": "Request message for PredictionService.CountTokens.", "id": "GoogleCloudAiplatformV1beta1CountTokensRequest", "properties": { + "contents": { + "description": "Required. Input content.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Content" + }, + "type": "array" + }, "instances": { "description": "Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.", "items": { "type": "any" }, "type": "array" + }, + "model": { + "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "type": "string" } }, "type": "object" @@ -18794,6 +19287,11 @@ "description": "Immutable. The ID of the DeployedIndex in the above IndexEndpoint.", "type": "string" }, + "displayName": { + "description": "Output only. The display name of the DeployedIndex.", + "readOnly": true, + "type": "string" + }, "indexEndpoint": { "description": "Immutable. A resource name of the IndexEndpoint.", "type": "string" @@ -18918,6 +19416,70 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1DirectPredictRequest": { + "description": "Request message for PredictionService.DirectPredict.", + "id": "GoogleCloudAiplatformV1beta1DirectPredictRequest", + "properties": { + "inputs": { + "description": "The prediction input.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Tensor" + }, + "type": "array" + }, + "parameters": { + "$ref": "GoogleCloudAiplatformV1beta1Tensor", + "description": "The parameters that govern the prediction." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1DirectPredictResponse": { + "description": "Response message for PredictionService.DirectPredict.", + "id": "GoogleCloudAiplatformV1beta1DirectPredictResponse", + "properties": { + "outputs": { + "description": "The prediction output.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Tensor" + }, + "type": "array" + }, + "parameters": { + "$ref": "GoogleCloudAiplatformV1beta1Tensor", + "description": "The parameters that govern the prediction." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1DirectRawPredictRequest": { + "description": "Request message for PredictionService.DirectRawPredict.", + "id": "GoogleCloudAiplatformV1beta1DirectRawPredictRequest", + "properties": { + "input": { + "description": "The prediction input.", + "format": "byte", + "type": "string" + }, + "methodName": { + "description": "Fully qualified name of the API method being invoked to perform predictions. Format: `/namespace.Service/Method/` Example: `/tensorflow.serving.PredictionService/Predict`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1DirectRawPredictResponse": { + "description": "Response message for PredictionService.DirectRawPredict.", + "id": "GoogleCloudAiplatformV1beta1DirectRawPredictResponse", + "properties": { + "output": { + "description": "The prediction output.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1DiskSpec": { "description": "Represents the spec of disk options.", "id": "GoogleCloudAiplatformV1beta1DiskSpec", @@ -19988,7 +20550,7 @@ "id": "GoogleCloudAiplatformV1beta1ExportDataResponse", "properties": { "exportedFiles": { - "description": "All of the files that are exported in this export operation.", + "description": "All of the files that are exported in this export operation. For custom code training export, only three (training, validation and test) GCS paths in wildcard format are populated (e.g., gs://.../training-*).", "items": { "type": "string" }, @@ -20369,8 +20931,7 @@ "type": "object" }, "name": { - "description": "Output only. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", - "readOnly": true, + "description": "Identifier. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", "type": "string" }, "updateTime": { @@ -20491,8 +21052,7 @@ "type": "object" }, "name": { - "description": "Output only. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", - "readOnly": true, + "description": "Identifier. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", "type": "string" }, "optimized": { @@ -20768,8 +21328,7 @@ "type": "object" }, "name": { - "description": "Output only. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", - "readOnly": true, + "description": "Identifier. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", "type": "string" }, "syncConfig": { @@ -20865,8 +21424,7 @@ "readOnly": true }, "name": { - "description": "Output only. Name of the FeatureViewSync. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`", - "readOnly": true, + "description": "Identifier. Name of the FeatureViewSync. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`", "type": "string" }, "runTime": { @@ -20878,6 +21436,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1FeatureViewSyncConfig": { + "description": "Configuration for Sync. Only one option is set.", "id": "GoogleCloudAiplatformV1beta1FeatureViewSyncConfig", "properties": { "cron": { @@ -21249,6 +21808,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1FileData": { + "description": "URI based data.", + "id": "GoogleCloudAiplatformV1beta1FileData", + "properties": { + "fileUri": { + "description": "Required. URI.", + "type": "string" + }, + "mimeType": { + "description": "Required. Mime type of the data.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1FilterSplit": { "description": "Assigns input data to training, validation, and test sets based on the given filters, data pieces not matched by any filter are ignored. Currently only supported for Datasets containing DataItems. If any of the filters in this message are to match nothing, then they can be set as '-' (the minus sign). Supported only for unstructured Datasets. ", "id": "GoogleCloudAiplatformV1beta1FilterSplit", @@ -21391,6 +21965,63 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1FunctionCall": { + "description": "A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values.", + "id": "GoogleCloudAiplatformV1beta1FunctionCall", + "properties": { + "args": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details.", + "type": "object" + }, + "name": { + "description": "Required. The name of the function to call. Matches [FunctionDeclaration.name].", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1FunctionDeclaration": { + "description": "Function declaration details.", + "id": "GoogleCloudAiplatformV1beta1FunctionDeclaration", + "properties": { + "description": { + "description": "Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.", + "type": "string" + }, + "name": { + "description": "Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": "string" + }, + "parameters": { + "$ref": "GoogleCloudAiplatformV1beta1Schema", + "description": "Optional. Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. For function with no parameters, this can be left unset." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1FunctionResponse": { + "description": "The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction.", + "id": "GoogleCloudAiplatformV1beta1FunctionResponse", + "properties": { + "name": { + "description": "Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Required. The function response in JSON object format.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1GcsDestination": { "description": "The Google Cloud Storage location where the output is to be written to.", "id": "GoogleCloudAiplatformV1beta1GcsDestination", @@ -21451,6 +22082,188 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1GenerateContentRequest": { + "description": "Request message for [PredictionService.GenerateContent].", + "id": "GoogleCloudAiplatformV1beta1GenerateContentRequest", + "properties": { + "contents": { + "description": "Required. Input content.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Content" + }, + "type": "array" + }, + "endpoint": { + "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "type": "string" + }, + "generationConfig": { + "$ref": "GoogleCloudAiplatformV1beta1GenerationConfig", + "description": "Optional. Generation config." + }, + "safetySettings": { + "description": "Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1SafetySetting" + }, + "type": "array" + }, + "tools": { + "description": "Optional. Tools that the model may use to generate response.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Tool" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GenerateContentResponse": { + "description": "Response message for [PredictionService.GenerateContent].", + "id": "GoogleCloudAiplatformV1beta1GenerateContentResponse", + "properties": { + "candidates": { + "description": "Output only. Generated candidates.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Candidate" + }, + "readOnly": true, + "type": "array" + }, + "promptFeedback": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback", + "description": "Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.", + "readOnly": true + }, + "usageMetadata": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata", + "description": "Usage metadata about the response(s)." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback": { + "description": "Content filter results for a prompt sent in the request.", + "id": "GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback", + "properties": { + "blockReason": { + "description": "Output only. Blocked reason.", + "enum": [ + "BLOCKED_REASON_UNSPECIFIED", + "SAFETY", + "OTHER" + ], + "enumDescriptions": [ + "Unspecified blocked reason.", + "Candidates blocked due to safety.", + "Candidates blocked due to other reason." + ], + "readOnly": true, + "type": "string" + }, + "blockReasonMessage": { + "description": "Output only. A readable block reason message.", + "readOnly": true, + "type": "string" + }, + "safetyRatings": { + "description": "Output only. Safety ratings.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1SafetyRating" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata": { + "description": "Usage metadata about response(s).", + "id": "GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata", + "properties": { + "candidatesTokenCount": { + "description": "Number of tokens in the response(s).", + "format": "int32", + "type": "integer" + }, + "promptTokenCount": { + "description": "Number of tokens in the request.", + "format": "int32", + "type": "integer" + }, + "totalTokenCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GenerationConfig": { + "description": "Generation config.", + "id": "GoogleCloudAiplatformV1beta1GenerationConfig", + "properties": { + "candidateCount": { + "description": "Optional. Number of candidates to generate.", + "format": "int32", + "type": "integer" + }, + "echo": { + "description": "Optional. Echo.", + "type": "boolean" + }, + "frequencyPenalty": { + "description": "Optional. Frequency penalties.", + "format": "float", + "type": "number" + }, + "logitBias": { + "additionalProperties": { + "format": "float", + "type": "number" + }, + "description": "Optional. Logit bias.", + "type": "object" + }, + "logprobs": { + "description": "Optional. Logit probabilities.", + "format": "int32", + "type": "integer" + }, + "maxOutputTokens": { + "description": "Optional. The maximum number of output tokens to generate per message.", + "format": "int32", + "type": "integer" + }, + "presencePenalty": { + "description": "Optional. Positive penalties.", + "format": "float", + "type": "number" + }, + "stopSequences": { + "description": "Optional. Stop sequences.", + "items": { + "type": "string" + }, + "type": "array" + }, + "temperature": { + "description": "Optional. Controls the randomness of predictions.", + "format": "float", + "type": "number" + }, + "topK": { + "description": "Optional. If specified, top-k sampling will be used.", + "format": "float", + "type": "number" + }, + "topP": { + "description": "Optional. If specified, nucleus sampling will be used.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1GenericOperationMetadata": { "description": "Generic Metadata shared by all operations.", "id": "GoogleCloudAiplatformV1beta1GenericOperationMetadata", @@ -23788,7 +24601,7 @@ "type": "array" }, "deploymentTimeout": { - "description": "Immutable. Deployment timeout. TODO (b/306244185): Revise documentation before exposing.", + "description": "Immutable. Deployment timeout. Limit for deployment timeout is 2 hours.", "format": "google-duration", "type": "string" }, @@ -23799,9 +24612,16 @@ }, "type": "array" }, + "grpcPorts": { + "description": "Immutable. List of ports to expose from the container. Vertex AI sends gRPC prediction requests that it receives to the first port on this list. Vertex AI also sends liveness and health checks to this port. If you do not specify this field, gRPC requests to the container will be disabled. Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers v1 core API.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Port" + }, + "type": "array" + }, "healthProbe": { "$ref": "GoogleCloudAiplatformV1beta1Probe", - "description": "Immutable. Specification for Kubernetes readiness probe. TODO (b/306244185): Revise documentation before exposing." + "description": "Immutable. Specification for Kubernetes readiness probe." }, "healthRoute": { "description": "Immutable. HTTP path on the container to send health checks to. Vertex AI intermittently sends GET requests to this path on the container's IP address and port to check that the container is healthy. Read more about [health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). For example, if you set this field to `/bar`, then Vertex AI intermittently sends a GET request to the `/bar` path on the port of your container specified by the first value of this `ModelContainerSpec`'s ports field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/ DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)", @@ -23823,13 +24643,13 @@ "type": "string" }, "sharedMemorySizeMb": { - "description": "Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes. TODO (b/306244185): Revise documentation before exposing.", + "description": "Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes.", "format": "int64", "type": "string" }, "startupProbe": { "$ref": "GoogleCloudAiplatformV1beta1Probe", - "description": "Immutable. Specification for Kubernetes startup probe. TODO (b/306244185): Revise documentation before exposing." + "description": "Immutable. Specification for Kubernetes startup probe." } }, "type": "object" @@ -25584,6 +26404,37 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Part": { + "description": "Content part.", + "id": "GoogleCloudAiplatformV1beta1Part", + "properties": { + "fileData": { + "$ref": "GoogleCloudAiplatformV1beta1FileData", + "description": "Optional. URI based data." + }, + "functionCall": { + "$ref": "GoogleCloudAiplatformV1beta1FunctionCall", + "description": "Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values." + }, + "functionResponse": { + "$ref": "GoogleCloudAiplatformV1beta1FunctionResponse", + "description": "Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model." + }, + "inlineData": { + "$ref": "GoogleCloudAiplatformV1beta1Blob", + "description": "Optional. Inlined bytes data." + }, + "text": { + "description": "Optional. Text part (can be code).", + "type": "string" + }, + "videoMetadata": { + "$ref": "GoogleCloudAiplatformV1beta1VideoMetadata", + "description": "Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PauseModelDeploymentMonitoringJobRequest": { "description": "Request message for JobService.PauseModelDeploymentMonitoringJob.", "id": "GoogleCloudAiplatformV1beta1PauseModelDeploymentMonitoringJobRequest", @@ -25686,14 +26537,16 @@ "PROVISIONING", "RUNNING", "STOPPING", - "ERROR" + "ERROR", + "REBOOTING" ], "enumDescriptions": [ "Not set.", "The PROVISIONING state indicates the persistent resources is being created.", - "The RUNNING state indicates the persistent resources is healthy and fully usable.", - "The STOPPING state indicates the persistent resources is being deleted.", - "The ERROR state indicates the persistent resources may be unusable. Details can be found in the `error` field." + "The RUNNING state indicates the persistent resource is healthy and fully usable.", + "The STOPPING state indicates the persistent resource is being deleted.", + "The ERROR state indicates the persistent resource may be unusable. Details can be found in the `error` field.", + "The REBOOTING state indicates the persistent resource is being rebooted (PR is not available right now but is expected to be ready again later)." ], "readOnly": true, "type": "string" @@ -27354,6 +28207,99 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1SafetyRating": { + "description": "Safety rating corresponding to the generated content.", + "id": "GoogleCloudAiplatformV1beta1SafetyRating", + "properties": { + "blocked": { + "description": "Output only. Indicates whether the content was filtered out because of this rating.", + "readOnly": true, + "type": "boolean" + }, + "category": { + "description": "Output only. Harm category.", + "enum": [ + "HARM_CATEGORY_UNSPECIFIED", + "HARM_CATEGORY_HATE_SPEECH", + "HARM_CATEGORY_DANGEROUS_CONTENT", + "HARM_CATEGORY_HARASSMENT", + "HARM_CATEGORY_SEXUALLY_EXPLICIT" + ], + "enumDescriptions": [ + "The harm category is unspecified.", + "The harm category is hate speech.", + "The harm category is dangerous content.", + "The harm category is harassment.", + "The harm category is sexually explicit content." + ], + "readOnly": true, + "type": "string" + }, + "probability": { + "description": "Output only. Harm probability levels in the content.", + "enum": [ + "HARM_PROBABILITY_UNSPECIFIED", + "NEGLIGIBLE", + "LOW", + "MEDIUM", + "HIGH" + ], + "enumDescriptions": [ + "Harm probability unspecified.", + "Negligible level of harm.", + "Low level of harm.", + "Medium level of harm.", + "High level of harm." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1SafetySetting": { + "description": "Safety settings.", + "id": "GoogleCloudAiplatformV1beta1SafetySetting", + "properties": { + "category": { + "description": "Required. Harm category.", + "enum": [ + "HARM_CATEGORY_UNSPECIFIED", + "HARM_CATEGORY_HATE_SPEECH", + "HARM_CATEGORY_DANGEROUS_CONTENT", + "HARM_CATEGORY_HARASSMENT", + "HARM_CATEGORY_SEXUALLY_EXPLICIT" + ], + "enumDescriptions": [ + "The harm category is unspecified.", + "The harm category is hate speech.", + "The harm category is dangerous content.", + "The harm category is harassment.", + "The harm category is sexually explicit content." + ], + "type": "string" + }, + "threshold": { + "description": "Required. The harm block threshold.", + "enum": [ + "HARM_BLOCK_THRESHOLD_UNSPECIFIED", + "BLOCK_LOW_AND_ABOVE", + "BLOCK_MEDIUM_AND_ABOVE", + "BLOCK_ONLY_HIGH", + "BLOCK_NONE" + ], + "enumDescriptions": [ + "Unspecified harm block threshold.", + "Block low threshold and above (i.e. block more).", + "Block medium threshold and above.", + "Block only high threshold (i.e. block less).", + "Block none." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1SampleConfig": { "description": "Active learning data sampling config. For every active learning labeling iteration, it will select a batch of data based on the sampling strategy.", "id": "GoogleCloudAiplatformV1beta1SampleConfig", @@ -27632,6 +28578,76 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Schema": { + "description": "Represents a select subset of an OpenAPI 3.0 Schema object. Schema is used to define the format of input/output data. More fields may be added in the future as needed. https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject", + "id": "GoogleCloudAiplatformV1beta1Schema", + "properties": { + "description": { + "description": "Optional. The description of the data.", + "type": "string" + }, + "enum": { + "description": "Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]}", + "items": { + "type": "string" + }, + "type": "array" + }, + "example": { + "description": "Optional. Example of the object. Will only populated when the object is the root.", + "type": "any" + }, + "format": { + "description": "Optional. The format of the data. Supported formats: for NUMBER type: float, double for INTEGER type: int32, int64", + "type": "string" + }, + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Schema", + "description": "Optional. Schema of the elements of Type.ARRAY." + }, + "nullable": { + "description": "Optional. Indicates if the value may be null.", + "type": "boolean" + }, + "properties": { + "additionalProperties": { + "$ref": "GoogleCloudAiplatformV1beta1Schema" + }, + "description": "Optional. Properties of Type.OBJECT.", + "type": "object" + }, + "required": { + "description": "Optional. Required properties of Type.OBJECT.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Optional. The type of the data.", + "enum": [ + "TYPE_UNSPECIFIED", + "STRING", + "NUMBER", + "INTEGER", + "BOOLEAN", + "ARRAY", + "OBJECT" + ], + "enumDescriptions": [ + "Not specified, should not be used.", + "OpenAPI string type", + "OpenAPI number type", + "OpenAPI integer type", + "OpenAPI boolean type", + "OpenAPI array type", + "OpenAPI object type" + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1SchemaAnnotationSpecColor": { "description": "An entry of mapping between color and AnnotationSpec. The mapping is used in segmentation mask.", "id": "GoogleCloudAiplatformV1beta1SchemaAnnotationSpecColor", @@ -32791,6 +33807,20 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Tool": { + "description": "Tool details that the model may use to generate response.", + "id": "GoogleCloudAiplatformV1beta1Tool", + "properties": { + "functionDeclarations": { + "description": "Optional. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 64 function declarations can be provided.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1FunctionDeclaration" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1TrainingConfig": { "description": "CMLE training config. For every active learning labeling iteration, system will train a machine learning model on CMLE. The trained model will be used by data sampling algorithm to select DataItems.", "id": "GoogleCloudAiplatformV1beta1TrainingConfig", @@ -33296,6 +34326,27 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeOperationMetadata": { + "description": "Metadata information for NotebookService.UpgradeNotebookRuntime.", + "id": "GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeOperationMetadata", + "properties": { + "genericMetadata": { + "$ref": "GoogleCloudAiplatformV1beta1GenericOperationMetadata", + "description": "The operation generic information." + }, + "progressMessage": { + "description": "A human-readable message that shows the intermediate progress details of NotebookRuntime.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeRequest": { + "description": "Request message for NotebookService.UpgradeNotebookRuntime.", + "id": "GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeRequest", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1beta1UploadModelOperationMetadata": { "description": "Details of ModelService.UploadModel operation.", "id": "GoogleCloudAiplatformV1beta1UploadModelOperationMetadata", @@ -33406,6 +34457,23 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1VideoMetadata": { + "description": "Metadata describes the input video content.", + "id": "GoogleCloudAiplatformV1beta1VideoMetadata", + "properties": { + "endOffset": { + "description": "Optional. The end offset of the video.", + "format": "google-duration", + "type": "string" + }, + "startOffset": { + "description": "Optional. The start offset of the video.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1WorkerPoolSpec": { "description": "Represents the spec of a worker pool in a job.", "id": "GoogleCloudAiplatformV1beta1WorkerPoolSpec", @@ -33816,6 +34884,28 @@ }, "type": "object" }, + "GoogleTypeDate": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "GoogleTypeDate", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleTypeExpr": { "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", "id": "GoogleTypeExpr", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index d6f43b9751d..6baeda59638 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -185,6 +185,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.DeploymentResourcePools = NewProjectsLocationsDeploymentResourcePoolsService(s) rs.EdgeDevices = NewProjectsLocationsEdgeDevicesService(s) rs.Endpoints = NewProjectsLocationsEndpointsService(s) + rs.ExampleStores = NewProjectsLocationsExampleStoresService(s) rs.ExtensionControllers = NewProjectsLocationsExtensionControllersService(s) rs.Extensions = NewProjectsLocationsExtensionsService(s) rs.FeatureGroups = NewProjectsLocationsFeatureGroupsService(s) @@ -232,6 +233,8 @@ type ProjectsLocationsService struct { Endpoints *ProjectsLocationsEndpointsService + ExampleStores *ProjectsLocationsExampleStoresService + ExtensionControllers *ProjectsLocationsExtensionControllersService Extensions *ProjectsLocationsExtensionsService @@ -530,6 +533,27 @@ type ProjectsLocationsEndpointsOperationsService struct { s *Service } +func NewProjectsLocationsExampleStoresService(s *Service) *ProjectsLocationsExampleStoresService { + rs := &ProjectsLocationsExampleStoresService{s: s} + rs.Operations = NewProjectsLocationsExampleStoresOperationsService(s) + return rs +} + +type ProjectsLocationsExampleStoresService struct { + s *Service + + Operations *ProjectsLocationsExampleStoresOperationsService +} + +func NewProjectsLocationsExampleStoresOperationsService(s *Service) *ProjectsLocationsExampleStoresOperationsService { + rs := &ProjectsLocationsExampleStoresOperationsService{s: s} + return rs +} + +type ProjectsLocationsExampleStoresOperationsService struct { + s *Service +} + func NewProjectsLocationsExtensionControllersService(s *Service) *ProjectsLocationsExtensionControllersService { rs := &ProjectsLocationsExtensionControllersService{s: s} rs.Operations = NewProjectsLocationsExtensionControllersOperationsService(s) @@ -2145,6 +2169,37 @@ func (s *GoogleCloudAiplatformV1beta1AvroSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1BatchCancelPipelineJobsRequest: Request +// message for PipelineService.BatchCancelPipelineJobs. +type GoogleCloudAiplatformV1beta1BatchCancelPipelineJobsRequest struct { + // Names: Required. The names of the PipelineJobs to cancel. A maximum + // of 32 PipelineJobs can be cancelled in a batch. Format: + // `projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}` + Names []string `json:"names,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Names") to + // unconditionally include in API requests. By default, fields with + // empty or default values are 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. "Names") 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 *GoogleCloudAiplatformV1beta1BatchCancelPipelineJobsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1BatchCancelPipelineJobsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1BatchCreateFeaturesOperationMetadata: // Details of operations that perform batch create Features. type GoogleCloudAiplatformV1beta1BatchCreateFeaturesOperationMetadata struct { @@ -3455,6 +3510,37 @@ func (s *GoogleCloudAiplatformV1beta1BigQuerySource) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Blob: Content blob. +type GoogleCloudAiplatformV1beta1Blob struct { + // Data: Required. Data. + Data string `json:"data,omitempty"` + + // MimeType: Required. Mime type of the data. + MimeType string `json:"mimeType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Data") 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. "Data") 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 *GoogleCloudAiplatformV1beta1Blob) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Blob + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1BlurBaselineConfig: Config for blur // baseline. When enabled, a linear path from the maximally blurred // image to the input image is created. Using a blurred baseline instead @@ -3567,6 +3653,66 @@ type GoogleCloudAiplatformV1beta1CancelPipelineJobRequest struct { type GoogleCloudAiplatformV1beta1CancelTrainingPipelineRequest struct { } +// GoogleCloudAiplatformV1beta1Candidate: Generated candidate. +type GoogleCloudAiplatformV1beta1Candidate struct { + // CitationMetadata: Output only. Source attribution of the generated + // content. + CitationMetadata *GoogleCloudAiplatformV1beta1CitationMetadata `json:"citationMetadata,omitempty"` + + // Content: Output only. Content parts of the candidate. + Content *GoogleCloudAiplatformV1beta1Content `json:"content,omitempty"` + + // FinishMessage: Output only. A string that describes the filtering + // behavior in more detail. Only filled when reason is set. + FinishMessage string `json:"finishMessage,omitempty"` + + // FinishReason: Output only. The reason why the model stopped + // generating tokens. + // + // Possible values: + // "FINISH_REASON_UNSPECIFIED" - The finish reason is unspecified. + // "STOP" - Natural stop point of the model or provided stop sequence. + // "MAX_TOKENS" - The maximum number of tokens as specified in the + // request was reached. + // "SAFETY" - The token generation was stopped as the response was + // flagged for safety reasons. NOTE: When streaming the + // Candidate.content will be empty if content filters blocked the + // output. + // "RECITATION" - The token generation was stopped as the response was + // flagged for unauthorized citations. + // "OTHER" - All other reasons that stopped the token generation + FinishReason string `json:"finishReason,omitempty"` + + // Index: Output only. Index of the candidate. + Index int64 `json:"index,omitempty"` + + // SafetyRatings: Output only. Safety ratings of the generated content. + SafetyRatings []*GoogleCloudAiplatformV1beta1SafetyRating `json:"safetyRatings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CitationMetadata") 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. "CitationMetadata") 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 *GoogleCloudAiplatformV1beta1Candidate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Candidate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1CheckTrialEarlyStoppingStateMetatdata: // This message will be placed in the metadata field of a // google.longrunning.Operation associated with a @@ -3639,6 +3785,79 @@ func (s *GoogleCloudAiplatformV1beta1CheckTrialEarlyStoppingStateResponse) Marsh return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Citation: Source attributions for +// content. +type GoogleCloudAiplatformV1beta1Citation struct { + // EndIndex: Output only. End index into the content. + EndIndex int64 `json:"endIndex,omitempty"` + + // License: Output only. License of the attribution. + License string `json:"license,omitempty"` + + // PublicationDate: Output only. Publication date of the attribution. + PublicationDate *GoogleTypeDate `json:"publicationDate,omitempty"` + + // StartIndex: Output only. Start index into the content. + StartIndex int64 `json:"startIndex,omitempty"` + + // Title: Output only. Title of the attribution. + Title string `json:"title,omitempty"` + + // Uri: Output only. Url reference of the attribution. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndIndex") 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. "EndIndex") 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 *GoogleCloudAiplatformV1beta1Citation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Citation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1CitationMetadata: A collection of source +// attributions for a piece of content. +type GoogleCloudAiplatformV1beta1CitationMetadata struct { + // Citations: Output only. List of citations. + Citations []*GoogleCloudAiplatformV1beta1Citation `json:"citations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Citations") 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. "Citations") 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 *GoogleCloudAiplatformV1beta1CitationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1CitationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1CompleteTrialRequest: Request message for // VizierService.CompleteTrial. type GoogleCloudAiplatformV1beta1CompleteTrialRequest struct { @@ -3872,6 +4091,42 @@ func (s *GoogleCloudAiplatformV1beta1ContainerSpec) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Content: A single turn in a conversation +// with the model. +type GoogleCloudAiplatformV1beta1Content struct { + // Parts: Required. Ordered parts that make up a message. Parts may have + // different MIME types. + Parts []*GoogleCloudAiplatformV1beta1Part `json:"parts,omitempty"` + + // Role: Optional. The role in a conversation associated with this + // content. Set it only if a content represents a turn in a + // conversations, otherwise no need to set role. Possible values: user, + // model. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Parts") 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. "Parts") 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 *GoogleCloudAiplatformV1beta1Content) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Content + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Context: Instance of a general context. type GoogleCloudAiplatformV1beta1Context struct { // CreateTime: Output only. Timestamp when this Context was created. @@ -4067,12 +4322,20 @@ func (s *GoogleCloudAiplatformV1beta1CopyModelResponse) MarshalJSON() ([]byte, e // GoogleCloudAiplatformV1beta1CountTokensRequest: Request message for // PredictionService.CountTokens. type GoogleCloudAiplatformV1beta1CountTokensRequest struct { + // Contents: Required. Input content. + Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` + // Instances: Required. The instances that are the input to token // counting call. Schema is identical to the prediction schema of the // underlying model. Instances []interface{} `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to + // Model: Required. The name of the publisher model requested to serve + // the prediction. Format: + // `projects/{project}/locations/{location}/publishers/*/models/*` + Model string `json:"model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Contents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4080,7 +4343,7 @@ type GoogleCloudAiplatformV1beta1CountTokensRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in + // NullFields is a list of field names (e.g. "Contents") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6527,6 +6790,9 @@ type GoogleCloudAiplatformV1beta1DeployedIndexRef struct { // IndexEndpoint. DeployedIndexId string `json:"deployedIndexId,omitempty"` + // DisplayName: Output only. The display name of the DeployedIndex. + DisplayName string `json:"displayName,omitempty"` + // IndexEndpoint: Immutable. A resource name of the IndexEndpoint. IndexEndpoint string `json:"indexEndpoint,omitempty"` @@ -6776,6 +7042,141 @@ func (s *GoogleCloudAiplatformV1beta1DestinationFeatureSetting) MarshalJSON() ([ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1DirectPredictRequest: Request message for +// PredictionService.DirectPredict. +type GoogleCloudAiplatformV1beta1DirectPredictRequest struct { + // Inputs: The prediction input. + Inputs []*GoogleCloudAiplatformV1beta1Tensor `json:"inputs,omitempty"` + + // Parameters: The parameters that govern the prediction. + Parameters *GoogleCloudAiplatformV1beta1Tensor `json:"parameters,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Inputs") 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. "Inputs") 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 *GoogleCloudAiplatformV1beta1DirectPredictRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1DirectPredictRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1DirectPredictResponse: Response message +// for PredictionService.DirectPredict. +type GoogleCloudAiplatformV1beta1DirectPredictResponse struct { + // Outputs: The prediction output. + Outputs []*GoogleCloudAiplatformV1beta1Tensor `json:"outputs,omitempty"` + + // Parameters: The parameters that govern the prediction. + Parameters *GoogleCloudAiplatformV1beta1Tensor `json:"parameters,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Outputs") 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. "Outputs") 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 *GoogleCloudAiplatformV1beta1DirectPredictResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1DirectPredictResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1DirectRawPredictRequest: Request message +// for PredictionService.DirectRawPredict. +type GoogleCloudAiplatformV1beta1DirectRawPredictRequest struct { + // Input: The prediction input. + Input string `json:"input,omitempty"` + + // MethodName: Fully qualified name of the API method being invoked to + // perform predictions. Format: `/namespace.Service/Method/` Example: + // `/tensorflow.serving.PredictionService/Predict` + MethodName string `json:"methodName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Input") 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. "Input") 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 *GoogleCloudAiplatformV1beta1DirectRawPredictRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1DirectRawPredictRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1DirectRawPredictResponse: Response +// message for PredictionService.DirectRawPredict. +type GoogleCloudAiplatformV1beta1DirectRawPredictResponse struct { + // Output: The prediction output. + Output string `json:"output,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Output") 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. "Output") 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 *GoogleCloudAiplatformV1beta1DirectRawPredictResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1DirectRawPredictResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1DiskSpec: Represents the spec of disk // options. type GoogleCloudAiplatformV1beta1DiskSpec struct { @@ -8652,7 +9053,9 @@ func (s *GoogleCloudAiplatformV1beta1ExportDataRequest) MarshalJSON() ([]byte, e // DatasetService.ExportData. type GoogleCloudAiplatformV1beta1ExportDataResponse struct { // ExportedFiles: All of the files that are exported in this export - // operation. + // operation. For custom code training export, only three (training, + // validation and test) GCS paths in wildcard format are populated + // (e.g., gs://.../training-*). ExportedFiles []string `json:"exportedFiles,omitempty"` // ForceSendFields is a list of field names (e.g. "ExportedFiles") to @@ -9378,7 +9781,7 @@ type GoogleCloudAiplatformV1beta1FeatureGroup struct { // immutable. Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. Name of the FeatureGroup. Format: + // Name: Identifier. Name of the FeatureGroup. Format: // `projects/{project}/locations/{location}/featureGroups/{featureGroup}` Name string `json:"name,omitempty"` @@ -9611,7 +10014,7 @@ type GoogleCloudAiplatformV1beta1FeatureOnlineStore struct { // "aiplatform.googleapis.com/" and are immutable. Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. Name of the FeatureOnlineStore. Format: + // Name: Identifier. Name of the FeatureOnlineStore. Format: // `projects/{project}/locations/{location}/featureOnlineStores/{featureO // nlineStore}` Name string `json:"name,omitempty"` @@ -10160,7 +10563,7 @@ type GoogleCloudAiplatformV1beta1FeatureView struct { // and are immutable. Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. Name of the FeatureView. Format: + // Name: Identifier. Name of the FeatureView. Format: // `projects/{project}/locations/{location}/featureOnlineStores/{feature_ // online_store}/featureViews/{feature_view}` Name string `json:"name,omitempty"` @@ -10349,7 +10752,7 @@ type GoogleCloudAiplatformV1beta1FeatureViewSync struct { // FinalStatus: Output only. Final status of the FeatureViewSync. FinalStatus *GoogleRpcStatus `json:"finalStatus,omitempty"` - // Name: Output only. Name of the FeatureViewSync. Format: + // Name: Identifier. Name of the FeatureViewSync. Format: // `projects/{project}/locations/{location}/featureOnlineStores/{feature_ // online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_vi // ew_sync}` @@ -10385,6 +10788,8 @@ func (s *GoogleCloudAiplatformV1beta1FeatureViewSync) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1FeatureViewSyncConfig: Configuration for +// Sync. Only one option is set. type GoogleCloudAiplatformV1beta1FeatureViewSyncConfig struct { // Cron: Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch // scheduled runs. To explicitly set a timezone to the cron tab, apply a @@ -11083,6 +11488,37 @@ func (s *GoogleCloudAiplatformV1beta1FetchFeatureValuesResponseFeatureNameValueP return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1FileData: URI based data. +type GoogleCloudAiplatformV1beta1FileData struct { + // FileUri: Required. URI. + FileUri string `json:"fileUri,omitempty"` + + // MimeType: Required. Mime type of the data. + MimeType string `json:"mimeType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileUri") 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. "FileUri") 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 *GoogleCloudAiplatformV1beta1FileData) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FileData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1FilterSplit: Assigns input data to // training, validation, and test sets based on the given filters, data // pieces not matched by any filter are ignored. Currently only @@ -11437,6 +11873,121 @@ func (s *GoogleCloudAiplatformV1beta1FractionSplit) UnmarshalJSON(data []byte) e return nil } +// GoogleCloudAiplatformV1beta1FunctionCall: A predicted [FunctionCall] +// returned from the model that contains a string representing the +// [FunctionDeclaration.name] and a structured JSON object containing +// the parameters and their values. +type GoogleCloudAiplatformV1beta1FunctionCall struct { + // Args: Optional. Required. The function parameters and values in JSON + // object format. See [FunctionDeclaration.parameters] for parameter + // details. + Args googleapi.RawMessage `json:"args,omitempty"` + + // Name: Required. The name of the function to call. Matches + // [FunctionDeclaration.name]. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Args") 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. "Args") 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 *GoogleCloudAiplatformV1beta1FunctionCall) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FunctionCall + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1FunctionDeclaration: Function declaration +// details. +type GoogleCloudAiplatformV1beta1FunctionDeclaration struct { + // Description: Optional. Description and purpose of the function. Model + // uses it to decide how and whether to call the function. + Description string `json:"description,omitempty"` + + // Name: Required. The name of the function to call. Must start with a + // letter or an underscore. Must be a-z, A-Z, 0-9, or contain + // underscores and dashes, with a maximum length of 64. + Name string `json:"name,omitempty"` + + // Parameters: Optional. Describes the parameters to this function. + // Reflects the Open API 3.03 Parameter Object string Key: the name of + // the parameter. Parameter names are case sensitive. For function with + // no parameters, this can be left unset. + Parameters *GoogleCloudAiplatformV1beta1Schema `json:"parameters,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1FunctionDeclaration) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FunctionDeclaration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1FunctionResponse: The result output from +// a [FunctionCall] that contains a string representing the +// [FunctionDeclaration.name] and a structured JSON object containing +// any output from the function is used as context to the model. This +// should contain the result of a [FunctionCall] made based on model +// prediction. +type GoogleCloudAiplatformV1beta1FunctionResponse struct { + // Name: Required. The name of the function to call. Matches + // [FunctionDeclaration.name] and [FunctionCall.name]. + Name string `json:"name,omitempty"` + + // Response: Required. The function response in JSON object format. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1FunctionResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FunctionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1GcsDestination: The Google Cloud Storage // location where the output is to be written to. type GoogleCloudAiplatformV1beta1GcsDestination struct { @@ -11579,6 +12130,249 @@ func (s *GoogleCloudAiplatformV1beta1GenerateAccessTokenResponse) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1GenerateContentRequest: Request message +// for [PredictionService.GenerateContent]. +type GoogleCloudAiplatformV1beta1GenerateContentRequest struct { + // Contents: Required. Input content. + Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` + + // Endpoint: Required. The name of the Endpoint requested to serve the + // prediction. Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + Endpoint string `json:"endpoint,omitempty"` + + // GenerationConfig: Optional. Generation config. + GenerationConfig *GoogleCloudAiplatformV1beta1GenerationConfig `json:"generationConfig,omitempty"` + + // SafetySettings: Optional. Per request settings for blocking unsafe + // content. Enforced on GenerateContentResponse.candidates. + SafetySettings []*GoogleCloudAiplatformV1beta1SafetySetting `json:"safetySettings,omitempty"` + + // Tools: Optional. Tools that the model may use to generate response. + Tools []*GoogleCloudAiplatformV1beta1Tool `json:"tools,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Contents") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Contents") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GenerateContentRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerateContentRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GenerateContentResponse: Response message +// for [PredictionService.GenerateContent]. +type GoogleCloudAiplatformV1beta1GenerateContentResponse struct { + // Candidates: Output only. Generated candidates. + Candidates []*GoogleCloudAiplatformV1beta1Candidate `json:"candidates,omitempty"` + + // PromptFeedback: Output only. Content filter results for a prompt sent + // in the request. Note: Sent only in the first stream chunk. Only + // happens when no candidates were generated due to content violations. + PromptFeedback *GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback `json:"promptFeedback,omitempty"` + + // UsageMetadata: Usage metadata about the response(s). + UsageMetadata *GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata `json:"usageMetadata,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Candidates") 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. "Candidates") 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 *GoogleCloudAiplatformV1beta1GenerateContentResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerateContentResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback: +// Content filter results for a prompt sent in the request. +type GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback struct { + // BlockReason: Output only. Blocked reason. + // + // Possible values: + // "BLOCKED_REASON_UNSPECIFIED" - Unspecified blocked reason. + // "SAFETY" - Candidates blocked due to safety. + // "OTHER" - Candidates blocked due to other reason. + BlockReason string `json:"blockReason,omitempty"` + + // BlockReasonMessage: Output only. A readable block reason message. + BlockReasonMessage string `json:"blockReasonMessage,omitempty"` + + // SafetyRatings: Output only. Safety ratings. + SafetyRatings []*GoogleCloudAiplatformV1beta1SafetyRating `json:"safetyRatings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BlockReason") 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. "BlockReason") 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 *GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata: +// Usage metadata about response(s). +type GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata struct { + // CandidatesTokenCount: Number of tokens in the response(s). + CandidatesTokenCount int64 `json:"candidatesTokenCount,omitempty"` + + // PromptTokenCount: Number of tokens in the request. + PromptTokenCount int64 `json:"promptTokenCount,omitempty"` + + TotalTokenCount int64 `json:"totalTokenCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CandidatesTokenCount") 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. "CandidatesTokenCount") 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 *GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GenerationConfig: Generation config. +type GoogleCloudAiplatformV1beta1GenerationConfig struct { + // CandidateCount: Optional. Number of candidates to generate. + CandidateCount int64 `json:"candidateCount,omitempty"` + + // Echo: Optional. Echo. + Echo bool `json:"echo,omitempty"` + + // FrequencyPenalty: Optional. Frequency penalties. + FrequencyPenalty float64 `json:"frequencyPenalty,omitempty"` + + // LogitBias: Optional. Logit bias. + LogitBias map[string]float64 `json:"logitBias,omitempty"` + + // Logprobs: Optional. Logit probabilities. + Logprobs int64 `json:"logprobs,omitempty"` + + // MaxOutputTokens: Optional. The maximum number of output tokens to + // generate per message. + MaxOutputTokens int64 `json:"maxOutputTokens,omitempty"` + + // PresencePenalty: Optional. Positive penalties. + PresencePenalty float64 `json:"presencePenalty,omitempty"` + + // StopSequences: Optional. Stop sequences. + StopSequences []string `json:"stopSequences,omitempty"` + + // Temperature: Optional. Controls the randomness of predictions. + Temperature float64 `json:"temperature,omitempty"` + + // TopK: Optional. If specified, top-k sampling will be used. + TopK float64 `json:"topK,omitempty"` + + // TopP: Optional. If specified, nucleus sampling will be used. + TopP float64 `json:"topP,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CandidateCount") 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. "CandidateCount") 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 *GoogleCloudAiplatformV1beta1GenerationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GenerationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1GenerationConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1GenerationConfig + var s1 struct { + FrequencyPenalty gensupport.JSONFloat64 `json:"frequencyPenalty"` + PresencePenalty gensupport.JSONFloat64 `json:"presencePenalty"` + Temperature gensupport.JSONFloat64 `json:"temperature"` + TopK gensupport.JSONFloat64 `json:"topK"` + TopP gensupport.JSONFloat64 `json:"topP"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.FrequencyPenalty = float64(s1.FrequencyPenalty) + s.PresencePenalty = float64(s1.PresencePenalty) + s.Temperature = float64(s1.Temperature) + s.TopK = float64(s1.TopK) + s.TopP = float64(s1.TopP) + return nil +} + // GoogleCloudAiplatformV1beta1GenericOperationMetadata: Generic // Metadata shared by all operations. type GoogleCloudAiplatformV1beta1GenericOperationMetadata struct { @@ -15929,8 +16723,8 @@ type GoogleCloudAiplatformV1beta1ModelContainerSpec struct { // (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). Command []string `json:"command,omitempty"` - // DeploymentTimeout: Immutable. Deployment timeout. TODO (b/306244185): - // Revise documentation before exposing. + // DeploymentTimeout: Immutable. Deployment timeout. Limit for + // deployment timeout is 2 hours. DeploymentTimeout string `json:"deploymentTimeout,omitempty"` // Env: Immutable. List of environment variables to set in the @@ -15947,8 +16741,16 @@ type GoogleCloudAiplatformV1beta1ModelContainerSpec struct { // (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). Env []*GoogleCloudAiplatformV1beta1EnvVar `json:"env,omitempty"` + // GrpcPorts: Immutable. List of ports to expose from the container. + // Vertex AI sends gRPC prediction requests that it receives to the + // first port on this list. Vertex AI also sends liveness and health + // checks to this port. If you do not specify this field, gRPC requests + // to the container will be disabled. Vertex AI does not use ports other + // than the first one listed. This field corresponds to the `ports` + // field of the Kubernetes Containers v1 core API. + GrpcPorts []*GoogleCloudAiplatformV1beta1Port `json:"grpcPorts,omitempty"` + // HealthProbe: Immutable. Specification for Kubernetes readiness probe. - // TODO (b/306244185): Revise documentation before exposing. HealthProbe *GoogleCloudAiplatformV1beta1Probe `json:"healthProbe,omitempty"` // HealthRoute: Immutable. HTTP path on the container to send health @@ -16027,12 +16829,10 @@ type GoogleCloudAiplatformV1beta1ModelContainerSpec struct { PredictRoute string `json:"predictRoute,omitempty"` // SharedMemorySizeMb: Immutable. The amount of the VM memory to reserve - // as the shared memory for the model in megabytes. TODO (b/306244185): - // Revise documentation before exposing. + // as the shared memory for the model in megabytes. SharedMemorySizeMb int64 `json:"sharedMemorySizeMb,omitempty,string"` // StartupProbe: Immutable. Specification for Kubernetes startup probe. - // TODO (b/306244185): Revise documentation before exposing. StartupProbe *GoogleCloudAiplatformV1beta1Probe `json:"startupProbe,omitempty"` // ForceSendFields is a list of field names (e.g. "Args") to @@ -19011,6 +19811,56 @@ func (s *GoogleCloudAiplatformV1beta1NotebookRuntimeTemplateRef) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Part: Content part. +type GoogleCloudAiplatformV1beta1Part struct { + // FileData: Optional. URI based data. + FileData *GoogleCloudAiplatformV1beta1FileData `json:"fileData,omitempty"` + + // FunctionCall: Optional. A predicted [FunctionCall] returned from the + // model that contains a string representing the + // [FunctionDeclaration.name] with the parameters and their values. + FunctionCall *GoogleCloudAiplatformV1beta1FunctionCall `json:"functionCall,omitempty"` + + // FunctionResponse: Optional. The result output of a [FunctionCall] + // that contains a string representing the [FunctionDeclaration.name] + // and a structured JSON object containing any output from the function + // call. It is used as context to the model. + FunctionResponse *GoogleCloudAiplatformV1beta1FunctionResponse `json:"functionResponse,omitempty"` + + // InlineData: Optional. Inlined bytes data. + InlineData *GoogleCloudAiplatformV1beta1Blob `json:"inlineData,omitempty"` + + // Text: Optional. Text part (can be code). + Text string `json:"text,omitempty"` + + // VideoMetadata: Optional. Video metadata. The metadata should only be + // specified while the video data is presented in inline_data or + // file_data. + VideoMetadata *GoogleCloudAiplatformV1beta1VideoMetadata `json:"videoMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileData") 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. "FileData") 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 *GoogleCloudAiplatformV1beta1Part) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Part + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1PauseModelDeploymentMonitoringJobRequest: // Request message for JobService.PauseModelDeploymentMonitoringJob. type GoogleCloudAiplatformV1beta1PauseModelDeploymentMonitoringJobRequest struct { @@ -19134,12 +19984,15 @@ type GoogleCloudAiplatformV1beta1PersistentResource struct { // "STATE_UNSPECIFIED" - Not set. // "PROVISIONING" - The PROVISIONING state indicates the persistent // resources is being created. - // "RUNNING" - The RUNNING state indicates the persistent resources is + // "RUNNING" - The RUNNING state indicates the persistent resource is // healthy and fully usable. - // "STOPPING" - The STOPPING state indicates the persistent resources + // "STOPPING" - The STOPPING state indicates the persistent resource // is being deleted. - // "ERROR" - The ERROR state indicates the persistent resources may be + // "ERROR" - The ERROR state indicates the persistent resource may be // unusable. Details can be found in the `error` field. + // "REBOOTING" - The REBOOTING state indicates the persistent resource + // is being rebooted (PR is not available right now but is expected to + // be ready again later). State string `json:"state,omitempty"` // UpdateTime: Output only. Time when the PersistentResource was most @@ -22143,6 +22996,107 @@ func (s *GoogleCloudAiplatformV1beta1ResumeScheduleRequest) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1SafetyRating: Safety rating corresponding +// to the generated content. +type GoogleCloudAiplatformV1beta1SafetyRating struct { + // Blocked: Output only. Indicates whether the content was filtered out + // because of this rating. + Blocked bool `json:"blocked,omitempty"` + + // Category: Output only. Harm category. + // + // Possible values: + // "HARM_CATEGORY_UNSPECIFIED" - The harm category is unspecified. + // "HARM_CATEGORY_HATE_SPEECH" - The harm category is hate speech. + // "HARM_CATEGORY_DANGEROUS_CONTENT" - The harm category is dangerous + // content. + // "HARM_CATEGORY_HARASSMENT" - The harm category is harassment. + // "HARM_CATEGORY_SEXUALLY_EXPLICIT" - The harm category is sexually + // explicit content. + Category string `json:"category,omitempty"` + + // Probability: Output only. Harm probability levels in the content. + // + // Possible values: + // "HARM_PROBABILITY_UNSPECIFIED" - Harm probability unspecified. + // "NEGLIGIBLE" - Negligible level of harm. + // "LOW" - Low level of harm. + // "MEDIUM" - Medium level of harm. + // "HIGH" - High level of harm. + Probability string `json:"probability,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Blocked") 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. "Blocked") 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 *GoogleCloudAiplatformV1beta1SafetyRating) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SafetyRating + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1SafetySetting: Safety settings. +type GoogleCloudAiplatformV1beta1SafetySetting struct { + // Category: Required. Harm category. + // + // Possible values: + // "HARM_CATEGORY_UNSPECIFIED" - The harm category is unspecified. + // "HARM_CATEGORY_HATE_SPEECH" - The harm category is hate speech. + // "HARM_CATEGORY_DANGEROUS_CONTENT" - The harm category is dangerous + // content. + // "HARM_CATEGORY_HARASSMENT" - The harm category is harassment. + // "HARM_CATEGORY_SEXUALLY_EXPLICIT" - The harm category is sexually + // explicit content. + Category string `json:"category,omitempty"` + + // Threshold: Required. The harm block threshold. + // + // Possible values: + // "HARM_BLOCK_THRESHOLD_UNSPECIFIED" - Unspecified harm block + // threshold. + // "BLOCK_LOW_AND_ABOVE" - Block low threshold and above (i.e. block + // more). + // "BLOCK_MEDIUM_AND_ABOVE" - Block medium threshold and above. + // "BLOCK_ONLY_HIGH" - Block only high threshold (i.e. block less). + // "BLOCK_NONE" - Block none. + Threshold string `json:"threshold,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Category") 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. "Category") 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 *GoogleCloudAiplatformV1beta1SafetySetting) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SafetySetting + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1SampleConfig: Active learning data // sampling config. For every active learning labeling iteration, it // will select a batch of data based on the sampling strategy. @@ -22616,6 +23570,74 @@ func (s *GoogleCloudAiplatformV1beta1Scheduling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Schema: Represents a select subset of an +// OpenAPI 3.0 Schema object. Schema is used to define the format of +// input/output data. More fields may be added in the future as needed. +// https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject +type GoogleCloudAiplatformV1beta1Schema struct { + // Description: Optional. The description of the data. + Description string `json:"description,omitempty"` + + // Enum: Optional. Possible values of the element of Type.STRING with + // enum format. For example we can define an Enum Direction as : + // {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} + Enum []string `json:"enum,omitempty"` + + // Example: Optional. Example of the object. Will only populated when + // the object is the root. + Example interface{} `json:"example,omitempty"` + + // Format: Optional. The format of the data. Supported formats: for + // NUMBER type: float, double for INTEGER type: int32, int64 + Format string `json:"format,omitempty"` + + // Items: Optional. Schema of the elements of Type.ARRAY. + Items *GoogleCloudAiplatformV1beta1Schema `json:"items,omitempty"` + + // Nullable: Optional. Indicates if the value may be null. + Nullable bool `json:"nullable,omitempty"` + + // Properties: Optional. Properties of Type.OBJECT. + Properties map[string]GoogleCloudAiplatformV1beta1Schema `json:"properties,omitempty"` + + // Required: Optional. Required properties of Type.OBJECT. + Required []string `json:"required,omitempty"` + + // Type: Optional. The type of the data. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Not specified, should not be used. + // "STRING" - OpenAPI string type + // "NUMBER" - OpenAPI number type + // "INTEGER" - OpenAPI integer type + // "BOOLEAN" - OpenAPI boolean type + // "ARRAY" - OpenAPI array type + // "OBJECT" - OpenAPI object type + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1Schema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Schema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1SchemaAnnotationSpecColor: An entry of // mapping between color and AnnotationSpec. The mapping is used in // segmentation mask. @@ -33023,6 +34045,43 @@ func (s *GoogleCloudAiplatformV1beta1TokensInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Tool: Tool details that the model may use +// to generate response. +type GoogleCloudAiplatformV1beta1Tool struct { + // FunctionDeclarations: Optional. One or more function declarations to + // be passed to the model along with the current user query. Model may + // decide to call a subset of these functions by populating FunctionCall + // in the response. User should provide a FunctionResponse for each + // function call in the next turn. Based on the function responses, + // Model will generate the final response back to the user. Maximum 64 + // function declarations can be provided. + FunctionDeclarations []*GoogleCloudAiplatformV1beta1FunctionDeclaration `json:"functionDeclarations,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "FunctionDeclarations") 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. "FunctionDeclarations") 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 *GoogleCloudAiplatformV1beta1Tool) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Tool + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1TrainingConfig: CMLE training config. For // every active learning labeling iteration, system will train a machine // learning model on CMLE. The trained model will be used by data @@ -34010,6 +35069,45 @@ func (s *GoogleCloudAiplatformV1beta1UpdateTensorboardOperationMetadata) Marshal return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeOperationMetadata: +// Metadata information for NotebookService.UpgradeNotebookRuntime. +type GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1beta1GenericOperationMetadata `json:"genericMetadata,omitempty"` + + // ProgressMessage: A human-readable message that shows the intermediate + // progress details of NotebookRuntime. + ProgressMessage string `json:"progressMessage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 *GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeRequest: Request +// message for NotebookService.UpgradeNotebookRuntime. +type GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeRequest struct { +} + // GoogleCloudAiplatformV1beta1UploadModelOperationMetadata: Details of // ModelService.UploadModel operation. type GoogleCloudAiplatformV1beta1UploadModelOperationMetadata struct { @@ -34252,6 +35350,38 @@ func (s *GoogleCloudAiplatformV1beta1Value) UnmarshalJSON(data []byte) error { return nil } +// GoogleCloudAiplatformV1beta1VideoMetadata: Metadata describes the +// input video content. +type GoogleCloudAiplatformV1beta1VideoMetadata struct { + // EndOffset: Optional. The end offset of the video. + EndOffset string `json:"endOffset,omitempty"` + + // StartOffset: Optional. The start offset of the video. + StartOffset string `json:"startOffset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndOffset") 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. "EndOffset") 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 *GoogleCloudAiplatformV1beta1VideoMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1VideoMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1WorkerPoolSpec: Represents the spec of a // worker pool in a job. type GoogleCloudAiplatformV1beta1WorkerPoolSpec struct { @@ -35230,6 +36360,53 @@ func (s *GoogleTypeColor) UnmarshalJSON(data []byte) error { return nil } +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") 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 *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleTypeExpr: Represents a textual expression in the Common // Expression Language (CEL) syntax. CEL is a C-like expression // language. The syntax and semantics of CEL are documented at @@ -50128,6 +51305,299 @@ func (c *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOpt } +// method id "aiplatform.projects.locations.endpoints.directPredict": + +type ProjectsLocationsEndpointsDirectPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1directpredictrequest *GoogleCloudAiplatformV1beta1DirectPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DirectPredict: Perform an unary online prediction request for Vertex +// first-party products and frameworks. +// +// - endpoint: The name of the Endpoint requested to serve the +// prediction. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) DirectPredict(endpoint string, googlecloudaiplatformv1beta1directpredictrequest *GoogleCloudAiplatformV1beta1DirectPredictRequest) *ProjectsLocationsEndpointsDirectPredictCall { + c := &ProjectsLocationsEndpointsDirectPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1directpredictrequest = googlecloudaiplatformv1beta1directpredictrequest + 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 *ProjectsLocationsEndpointsDirectPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectPredictCall { + 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 *ProjectsLocationsEndpointsDirectPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectPredictCall { + 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 *ProjectsLocationsEndpointsDirectPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsDirectPredictCall) 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.googlecloudaiplatformv1beta1directpredictrequest) + 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}:directPredict") + 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.directPredict" call. +// Exactly one of *GoogleCloudAiplatformV1beta1DirectPredictResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAiplatformV1beta1DirectPredictResponse.ServerResponse.Head +// er 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 *ProjectsLocationsEndpointsDirectPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1DirectPredictResponse, 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 := &GoogleCloudAiplatformV1beta1DirectPredictResponse{ + 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": "Perform an unary online prediction request for Vertex first-party products and frameworks.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directPredict", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.endpoints.directPredict", + // "parameterOrder": [ + // "endpoint" + // ], + // "parameters": { + // "endpoint": { + // "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+endpoint}:directPredict", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1DirectPredictRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1beta1DirectPredictResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.endpoints.directRawPredict": + +type ProjectsLocationsEndpointsDirectRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1directrawpredictrequest *GoogleCloudAiplatformV1beta1DirectRawPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DirectRawPredict: Perform an online prediction request through gRPC. +// +// - endpoint: The name of the Endpoint requested to serve the +// prediction. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) DirectRawPredict(endpoint string, googlecloudaiplatformv1beta1directrawpredictrequest *GoogleCloudAiplatformV1beta1DirectRawPredictRequest) *ProjectsLocationsEndpointsDirectRawPredictCall { + c := &ProjectsLocationsEndpointsDirectRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1directrawpredictrequest = googlecloudaiplatformv1beta1directrawpredictrequest + 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 *ProjectsLocationsEndpointsDirectRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectRawPredictCall { + 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 *ProjectsLocationsEndpointsDirectRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectRawPredictCall { + 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 *ProjectsLocationsEndpointsDirectRawPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) 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.googlecloudaiplatformv1beta1directrawpredictrequest) + 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}:directRawPredict") + 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.directRawPredict" call. +// Exactly one of *GoogleCloudAiplatformV1beta1DirectRawPredictResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudAiplatformV1beta1DirectRawPredictResponse.ServerResponse.H +// eader 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 *ProjectsLocationsEndpointsDirectRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1DirectRawPredictResponse, 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 := &GoogleCloudAiplatformV1beta1DirectRawPredictResponse{ + 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": "Perform an online prediction request through gRPC.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directRawPredict", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.endpoints.directRawPredict", + // "parameterOrder": [ + // "endpoint" + // ], + // "parameters": { + // "endpoint": { + // "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+endpoint}:directRawPredict", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1DirectRawPredictRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1beta1DirectRawPredictResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.endpoints.explain": type ProjectsLocationsEndpointsExplainCall struct { @@ -51707,6 +53177,153 @@ func (c *ProjectsLocationsEndpointsSetIamPolicyCall) Do(opts ...googleapi.CallOp } +// method id "aiplatform.projects.locations.endpoints.streamGenerateContent": + +type ProjectsLocationsEndpointsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The name of the publisher model requested to serve the +// prediction. Format: +// `projects/{project}/locations/{location}/publishers/*/models/*`. +func (r *ProjectsLocationsEndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsEndpointsStreamGenerateContentCall { + c := &ProjectsLocationsEndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest + 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 *ProjectsLocationsEndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsStreamGenerateContentCall { + 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 *ProjectsLocationsEndpointsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsEndpointsStreamGenerateContentCall { + 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 *ProjectsLocationsEndpointsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) 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.googlecloudaiplatformv1beta1generatecontentrequest) + 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/{+model}:streamGenerateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.streamGenerateContent" call. +// Exactly one of *GoogleCloudAiplatformV1beta1GenerateContentResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.ServerResponse.He +// ader 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 *ProjectsLocationsEndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ + 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": "Generate content with multimodal inputs with streaming support.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:streamGenerateContent", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.endpoints.streamGenerateContent", + // "parameterOrder": [ + // "model" + // ], + // "parameters": { + // "model": { + // "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+model}:streamGenerateContent", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.endpoints.testIamPermissions": type ProjectsLocationsEndpointsTestIamPermissionsCall struct { @@ -52796,6 +54413,793 @@ func (c *ProjectsLocationsEndpointsOperationsWaitCall) Do(opts ...googleapi.Call } +// method id "aiplatform.projects.locations.exampleStores.operations.cancel": + +type ProjectsLocationsExampleStoresOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsExampleStoresOperationsService) Cancel(name string) *ProjectsLocationsExampleStoresOperationsCancelCall { + c := &ProjectsLocationsExampleStoresOperationsCancelCall{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 *ProjectsLocationsExampleStoresOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsCancelCall { + 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 *ProjectsLocationsExampleStoresOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsCancelCall { + 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 *ProjectsLocationsExampleStoresOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsExampleStoresOperationsCancelCall) 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, "v1beta1/{+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.exampleStores.operations.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 *ProjectsLocationsExampleStoresOperationsCancelCall) 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": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.exampleStores.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:cancel", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.exampleStores.operations.delete": + +type ProjectsLocationsExampleStoresOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsExampleStoresOperationsService) Delete(name string) *ProjectsLocationsExampleStoresOperationsDeleteCall { + c := &ProjectsLocationsExampleStoresOperationsDeleteCall{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 *ProjectsLocationsExampleStoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsDeleteCall { + 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 *ProjectsLocationsExampleStoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsDeleteCall { + 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 *ProjectsLocationsExampleStoresOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsExampleStoresOperationsDeleteCall) 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, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.exampleStores.operations.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 *ProjectsLocationsExampleStoresOperationsDeleteCall) 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 long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "aiplatform.projects.locations.exampleStores.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.exampleStores.operations.get": + +type ProjectsLocationsExampleStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsExampleStoresOperationsService) Get(name string) *ProjectsLocationsExampleStoresOperationsGetCall { + c := &ProjectsLocationsExampleStoresOperationsGetCall{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 *ProjectsLocationsExampleStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsGetCall { + 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 *ProjectsLocationsExampleStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsExampleStoresOperationsGetCall { + 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 *ProjectsLocationsExampleStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsGetCall { + 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 *ProjectsLocationsExampleStoresOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsExampleStoresOperationsGetCall) 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.locations.exampleStores.operations.get" 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 *ProjectsLocationsExampleStoresOperationsGetCall) 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": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "aiplatform.projects.locations.exampleStores.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "aiplatform.projects.locations.exampleStores.operations.list": + +type ProjectsLocationsExampleStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsExampleStoresOperationsService) List(name string) *ProjectsLocationsExampleStoresOperationsListCall { + c := &ProjectsLocationsExampleStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsExampleStoresOperationsListCall) Filter(filter string) *ProjectsLocationsExampleStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsExampleStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsExampleStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsExampleStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsExampleStoresOperationsListCall { + 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 *ProjectsLocationsExampleStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsListCall { + 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 *ProjectsLocationsExampleStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsExampleStoresOperationsListCall { + 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 *ProjectsLocationsExampleStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsListCall { + 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 *ProjectsLocationsExampleStoresOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsExampleStoresOperationsListCall) 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}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.exampleStores.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsExampleStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations", + // "httpMethod": "GET", + // "id": "aiplatform.projects.locations.exampleStores.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "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 *ProjectsLocationsExampleStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) 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.exampleStores.operations.wait": + +type ProjectsLocationsExampleStoresOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or +// reaches at most a specified timeout, returning the latest state. If +// the operation is already done, the latest state is immediately +// returned. If the timeout specified is greater than the default +// HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does +// not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. +// Note that this method is on a best-effort basis. It may return the +// latest state before the specified timeout (including immediately), +// meaning even an immediate response is no guarantee that the operation +// is done. +// +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsExampleStoresOperationsService) Wait(name string) *ProjectsLocationsExampleStoresOperationsWaitCall { + c := &ProjectsLocationsExampleStoresOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration +// to wait before timing out. If left blank, the wait will be at most +// the time permitted by the underlying HTTP/RPC protocol. If RPC +// context deadline is also specified, the shorter one will be used. +func (c *ProjectsLocationsExampleStoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsExampleStoresOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) + 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 *ProjectsLocationsExampleStoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsExampleStoresOperationsWaitCall { + 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 *ProjectsLocationsExampleStoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsExampleStoresOperationsWaitCall { + 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 *ProjectsLocationsExampleStoresOperationsWaitCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsExampleStoresOperationsWaitCall) 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, "v1beta1/{+name}:wait") + 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.exampleStores.operations.wait" 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 *ProjectsLocationsExampleStoresOperationsWaitCall) 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": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/exampleStores/{exampleStoresId}/operations/{operationsId}:wait", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.exampleStores.operations.wait", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to wait on.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/exampleStores/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "timeout": { + // "description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", + // "format": "google-duration", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:wait", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.extensionControllers.operations.cancel": type ProjectsLocationsExtensionControllersOperationsCancelCall struct { @@ -55859,7 +58263,7 @@ type ProjectsLocationsFeatureGroupsPatchCall struct { // Patch: Updates the parameters of a single FeatureGroup. // -// - name: Output only. Name of the FeatureGroup. Format: +// - name: Identifier. Name of the FeatureGroup. Format: // `projects/{project}/locations/{location}/featureGroups/{featureGroup // }`. func (r *ProjectsLocationsFeatureGroupsService) Patch(name string, googlecloudaiplatformv1beta1featuregroup *GoogleCloudAiplatformV1beta1FeatureGroup) *ProjectsLocationsFeatureGroupsPatchCall { @@ -55982,7 +58386,7 @@ func (c *ProjectsLocationsFeatureGroupsPatchCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "name": { - // "description": "Output only. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", + // "description": "Identifier. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+$", // "required": true, @@ -56537,7 +58941,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageSize(pageSize int64 // received from a previous FeaturestoreService.ListFeatures call or // FeatureRegistryService.ListFeatures call. Provide this to retrieve // the subsequent page. When paginating, all other parameters provided -// to FeaturestoreService.ListFeatures or or +// to FeaturestoreService.ListFeatures or // FeatureRegistryService.ListFeatures must match the call that provided // the page token. func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsFeaturesListCall { @@ -56684,7 +59088,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Do(opts ...googleapi.Ca // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or or FeatureRegistryService.ListFeatures must match the call that provided the page token.", + // "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must match the call that provided the page token.", // "location": "query", // "type": "string" // }, @@ -58907,7 +61311,7 @@ type ProjectsLocationsFeatureOnlineStoresPatchCall struct { // Patch: Updates the parameters of a single FeatureOnlineStore. // -// - name: Output only. Name of the FeatureOnlineStore. Format: +// - name: Identifier. Name of the FeatureOnlineStore. Format: // `projects/{project}/locations/{location}/featureOnlineStores/{featur // eOnlineStore}`. func (r *ProjectsLocationsFeatureOnlineStoresService) Patch(name string, googlecloudaiplatformv1beta1featureonlinestore *GoogleCloudAiplatformV1beta1FeatureOnlineStore) *ProjectsLocationsFeatureOnlineStoresPatchCall { @@ -59031,7 +61435,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "name": { - // "description": "Output only. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", + // "description": "Identifier. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+$", // "required": true, @@ -59917,7 +62321,7 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall struct { // Patch: Updates the parameters of a single FeatureView. // -// - name: Output only. Name of the FeatureView. Format: +// - name: Identifier. Name of the FeatureView. Format: // `projects/{project}/locations/{location}/featureOnlineStores/{featur // e_online_store}/featureViews/{feature_view}`. func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Patch(name string, googlecloudaiplatformv1beta1featureview *GoogleCloudAiplatformV1beta1FeatureView) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { @@ -60040,7 +62444,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Do(opts ...g // ], // "parameters": { // "name": { - // "description": "Output only. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", + // "description": "Identifier. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/featureOnlineStores/[^/]+/featureViews/[^/]+$", // "required": true, @@ -66692,7 +69096,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageSize(pag // received from a previous FeaturestoreService.ListFeatures call or // FeatureRegistryService.ListFeatures call. Provide this to retrieve // the subsequent page. When paginating, all other parameters provided -// to FeaturestoreService.ListFeatures or or +// to FeaturestoreService.ListFeatures or // FeatureRegistryService.ListFeatures must match the call that provided // the page token. func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { @@ -66839,7 +69243,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...g // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or or FeatureRegistryService.ListFeatures must match the call that provided the page token.", + // "description": "A page token, received from a previous FeaturestoreService.ListFeatures call or FeatureRegistryService.ListFeatures call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must match the call that provided the page token.", // "location": "query", // "type": "string" // }, @@ -93223,6 +95627,151 @@ func (c *ProjectsLocationsNotebookRuntimesStartCall) Do(opts ...googleapi.CallOp } +// method id "aiplatform.projects.locations.notebookRuntimes.upgrade": + +type ProjectsLocationsNotebookRuntimesUpgradeCall struct { + s *Service + name string + googlecloudaiplatformv1beta1upgradenotebookruntimerequest *GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Upgrade: Upgrades a NotebookRuntime. +// +// - name: The name of the NotebookRuntime resource to be upgrade. +// Instead of checking whether the name is in valid NotebookRuntime +// resource name format, directly throw NotFound exception if there is +// no such NotebookRuntime in spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Upgrade(name string, googlecloudaiplatformv1beta1upgradenotebookruntimerequest *GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesUpgradeCall { + c := &ProjectsLocationsNotebookRuntimesUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1upgradenotebookruntimerequest = googlecloudaiplatformv1beta1upgradenotebookruntimerequest + 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 *ProjectsLocationsNotebookRuntimesUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesUpgradeCall { + 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 *ProjectsLocationsNotebookRuntimesUpgradeCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesUpgradeCall { + 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 *ProjectsLocationsNotebookRuntimesUpgradeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) 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.googlecloudaiplatformv1beta1upgradenotebookruntimerequest) + 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}:upgrade") + 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.notebookRuntimes.upgrade" 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 *ProjectsLocationsNotebookRuntimesUpgradeCall) 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": "Upgrades a NotebookRuntime.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/notebookRuntimes/{notebookRuntimesId}:upgrade", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.notebookRuntimes.upgrade", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/notebookRuntimes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:upgrade", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1UpgradeNotebookRuntimeRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.operations.cancel": type ProjectsLocationsOperationsCancelCall struct { @@ -95596,6 +98145,154 @@ func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Do(opts ...goog } +// method id "aiplatform.projects.locations.pipelineJobs.batchCancel": + +type ProjectsLocationsPipelineJobsBatchCancelCall struct { + s *Service + parent string + googlecloudaiplatformv1beta1batchcancelpipelinejobsrequest *GoogleCloudAiplatformV1beta1BatchCancelPipelineJobsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCancel: Batch cancel PipelineJobs. Firstly the server will check +// if all the jobs are in non-terminal states, and skip the jobs that +// are already terminated. If the operation failed, none of the pipeline +// jobs are cancelled. The server will poll the states of all the +// pipeline jobs periodically to check the cancellation status. This +// operation will return an LRO. +// +// - parent: The name of the PipelineJobs' parent resource. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPipelineJobsService) BatchCancel(parent string, googlecloudaiplatformv1beta1batchcancelpipelinejobsrequest *GoogleCloudAiplatformV1beta1BatchCancelPipelineJobsRequest) *ProjectsLocationsPipelineJobsBatchCancelCall { + c := &ProjectsLocationsPipelineJobsBatchCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1beta1batchcancelpipelinejobsrequest = googlecloudaiplatformv1beta1batchcancelpipelinejobsrequest + 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 *ProjectsLocationsPipelineJobsBatchCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsBatchCancelCall { + 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 *ProjectsLocationsPipelineJobsBatchCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsBatchCancelCall { + 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 *ProjectsLocationsPipelineJobsBatchCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPipelineJobsBatchCancelCall) 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.googlecloudaiplatformv1beta1batchcancelpipelinejobsrequest) + 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/{+parent}/pipelineJobs:batchCancel") + 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.pipelineJobs.batchCancel" 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 *ProjectsLocationsPipelineJobsBatchCancelCall) 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": "Batch cancel PipelineJobs. Firstly the server will check if all the jobs are in non-terminal states, and skip the jobs that are already terminated. If the operation failed, none of the pipeline jobs are cancelled. The server will poll the states of all the pipeline jobs periodically to check the cancellation status. This operation will return an LRO.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/pipelineJobs:batchCancel", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.pipelineJobs.batchCancel", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the PipelineJobs' parent resource. Format: `projects/{project}/locations/{location}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/pipelineJobs:batchCancel", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1BatchCancelPipelineJobsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.pipelineJobs.batchDelete": type ProjectsLocationsPipelineJobsBatchDeleteCall struct { @@ -98122,6 +100819,153 @@ func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Do(opts .. } +// method id "aiplatform.projects.locations.publishers.models.streamGenerateContent": + +type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The name of the publisher model requested to serve the +// prediction. Format: +// `projects/{project}/locations/{location}/publishers/*/models/*`. +func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { + c := &ProjectsLocationsPublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest + 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 *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { + 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 *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { + 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 *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) 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.googlecloudaiplatformv1beta1generatecontentrequest) + 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/{+model}:streamGenerateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.publishers.models.streamGenerateContent" call. +// Exactly one of *GoogleCloudAiplatformV1beta1GenerateContentResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.ServerResponse.He +// ader 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 *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ + 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": "Generate content with multimodal inputs with streaming support.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:streamGenerateContent", + // "httpMethod": "POST", + // "id": "aiplatform.projects.locations.publishers.models.streamGenerateContent", + // "parameterOrder": [ + // "model" + // ], + // "parameters": { + // "model": { + // "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+model}:streamGenerateContent", + // "request": { + // "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + // }, + // "response": { + // "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "aiplatform.projects.locations.schedules.create": type ProjectsLocationsSchedulesCreateCall struct { diff --git a/analyticsdata/v1beta/analyticsdata-api.json b/analyticsdata/v1beta/analyticsdata-api.json index c7c7a000dae..6365ed64625 100644 --- a/analyticsdata/v1beta/analyticsdata-api.json +++ b/analyticsdata/v1beta/analyticsdata-api.json @@ -310,10 +310,137 @@ "https://www.googleapis.com/auth/analytics.readonly" ] } + }, + "resources": { + "audienceExports": { + "methods": { + "create": { + "description": "Creates an audience export for later retrieval. This method quickly returns the audience export's resource name and initiates a long running asynchronous request to form an audience export. To export the users in an audience export, first create the audience export through this method and then send the audience resource name to the `QueryAudienceExport` method. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. An audience export is a snapshot of the users currently in the audience at the time of audience export creation. Creating audience exports for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience exports contain the users in each audience. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "flatPath": "v1beta/properties/{propertiesId}/audienceExports", + "httpMethod": "POST", + "id": "analyticsdata.properties.audienceExports.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this audience export will be created. Format: `properties/{property}`", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/audienceExports", + "request": { + "$ref": "AudienceExport" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "get": { + "description": "Gets configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "flatPath": "v1beta/properties/{propertiesId}/audienceExports/{audienceExportsId}", + "httpMethod": "GET", + "id": "analyticsdata.properties.audienceExports.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The audience export resource name. Format: `properties/{property}/audienceExports/{audience_export}`", + "location": "path", + "pattern": "^properties/[^/]+/audienceExports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "AudienceExport" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "list": { + "description": "Lists all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new audience exports. The same audience can have multiple audience exports that represent the export of users that were in an audience on different days. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "flatPath": "v1beta/properties/{propertiesId}/audienceExports", + "httpMethod": "GET", + "id": "analyticsdata.properties.audienceExports.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of audience exports to return. The service may return fewer than this value. If unspecified, at most 200 audience exports will be returned. The maximum value is 1000 (higher values will be coerced to the maximum).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListAudienceExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAudienceExports` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. All audience exports for this property will be listed in the response. Format: `properties/{property}`", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/audienceExports", + "response": { + "$ref": "ListAudienceExportsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "query": { + "description": "Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to `CreateAudienceExport` is necessary to create an audience export of users, and then second, this method is used to retrieve the users in the audience export. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + "flatPath": "v1beta/properties/{propertiesId}/audienceExports/{audienceExportsId}:query", + "httpMethod": "POST", + "id": "analyticsdata.properties.audienceExports.query", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the audience export to retrieve users from. Format: `properties/{property}/audienceExports/{audience_export}`", + "location": "path", + "pattern": "^properties/[^/]+/audienceExports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:query", + "request": { + "$ref": "QueryAudienceExportRequest" + }, + "response": { + "$ref": "QueryAudienceExportResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ] + } + } + } } } }, - "revision": "20231105", + "revision": "20231203", "rootUrl": "https://analyticsdata.googleapis.com/", "schemas": { "ActiveMetricRestriction": { @@ -344,6 +471,80 @@ }, "type": "object" }, + "AudienceExport": { + "description": "An audience export is a list of users in an audience at the time of the list's creation. One audience may have multiple audience exports created for different days.", + "id": "AudienceExport", + "properties": { + "audience": { + "description": "Required. The audience resource name. This resource name identifies the audience being listed and is shared between the Analytics Data \u0026 Admin APIs. Format: `properties/{property}/audiences/{audience}`", + "type": "string" + }, + "audienceDisplayName": { + "description": "Output only. The descriptive display name for this audience. For example, \"Purchasers\".", + "readOnly": true, + "type": "string" + }, + "beginCreatingTime": { + "description": "Output only. The time when CreateAudienceExport was called and the AudienceExport began the `CREATING` state.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "creationQuotaTokensCharged": { + "description": "Output only. The total quota tokens charged during creation of the AudienceExport. Because this token count is based on activity from the `CREATING` state, this tokens charged will be fixed once an AudienceExport enters the `ACTIVE` or `FAILED` states.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "dimensions": { + "description": "Required. The dimensions requested and displayed in the query response.", + "items": { + "$ref": "V1betaAudienceDimension" + }, + "type": "array" + }, + "errorMessage": { + "description": "Output only. Error message is populated when an audience export fails during creation. A common reason for such a failure is quota exhaustion.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Identifier. The audience export resource name assigned during creation. This resource name identifies this `AudienceExport`. Format: `properties/{property}/audienceExports/{audience_export}`", + "readOnly": true, + "type": "string" + }, + "percentageCompleted": { + "description": "Output only. The percentage completed for this audience export ranging between 0 to 100.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "rowCount": { + "description": "Output only. The total number of rows in the AudienceExport result.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "state": { + "description": "Output only. The current state for this AudienceExport.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "FAILED" + ], + "enumDescriptions": [ + "Unspecified state will never be used.", + "The AudienceExport is currently creating and will be available in the future. Creating occurs immediately after the CreateAudienceExport call.", + "The AudienceExport is fully created and ready for querying. An AudienceExport is updated to active asynchronously from a request; this occurs some time (for example 15 minutes) after the initial create call.", + "The AudienceExport failed to be created. It is possible that re-requesting this audience export will succeed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "AudienceListMetadata": { "description": "This metadata is currently blank.", "id": "AudienceListMetadata", @@ -850,6 +1051,24 @@ }, "type": "object" }, + "ListAudienceExportsResponse": { + "description": "A list of all audience exports for a property.", + "id": "ListAudienceExportsResponse", + "properties": { + "audienceExports": { + "description": "Each audience export for a property.", + "items": { + "$ref": "AudienceExport" + }, + "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" + }, "Metadata": { "description": "The dimensions, metrics and comparisons currently accepted in reporting methods.", "id": "Metadata", @@ -1144,6 +1363,41 @@ }, "type": "object" }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, "OrderBy": { "description": "Order bys define how rows will be sorted in the response. For example, ordering rows by descending event count is one ordering, and ordering rows by the event name string is a different ordering.", "id": "OrderBy", @@ -1316,6 +1570,46 @@ }, "type": "object" }, + "QueryAudienceExportRequest": { + "description": "A request to list users in an audience export.", + "id": "QueryAudienceExportRequest", + "properties": { + "limit": { + "description": "Optional. The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for. `limit` must be positive. The API can also return fewer rows than the requested `limit`, if there aren't as many dimension values as the `limit`. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", + "format": "int64", + "type": "string" + }, + "offset": { + "description": "Optional. The row count of the start row. The first row is counted as row 0. When paging, the first request does not specify offset; or equivalently, sets offset to 0; the first request returns the first `limit` of rows. The second request sets offset to the `limit` of the first request; the second request returns the second `limit` of rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "QueryAudienceExportResponse": { + "description": "A list of users in an audience export.", + "id": "QueryAudienceExportResponse", + "properties": { + "audienceExport": { + "$ref": "AudienceExport", + "description": "Configuration data about AudienceExport being queried. Returned to help interpret the audience rows in this response. For example, the dimensions in this AudienceExport correspond to the columns in the AudienceRows." + }, + "audienceRows": { + "description": "Rows for each user in an audience export. The number of rows in this response will be less than or equal to request's page size.", + "items": { + "$ref": "V1betaAudienceRow" + }, + "type": "array" + }, + "rowCount": { + "description": "The total number of rows in the AudienceExport result. `rowCount` is independent of the number of rows returned in the response, the `limit` request parameter, and the `offset` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "QuotaStatus": { "description": "Current state for a particular quota group.", "id": "QuotaStatus", @@ -1835,6 +2129,33 @@ }, "type": "object" }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, "StringFilter": { "description": "The filter for string", "id": "StringFilter", @@ -1871,6 +2192,42 @@ } }, "type": "object" + }, + "V1betaAudienceDimension": { + "description": "An audience dimension is a user attribute. Specific user attributed are requested and then later returned in the `QueryAudienceExportResponse`.", + "id": "V1betaAudienceDimension", + "properties": { + "dimensionName": { + "description": "Optional. The API name of the dimension. See the [API Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions) for the list of dimension names.", + "type": "string" + } + }, + "type": "object" + }, + "V1betaAudienceDimensionValue": { + "description": "The value of a dimension.", + "id": "V1betaAudienceDimensionValue", + "properties": { + "value": { + "description": "Value as a string if the dimension type is a string.", + "type": "string" + } + }, + "type": "object" + }, + "V1betaAudienceRow": { + "description": "Dimension value attributes for the audience user row.", + "id": "V1betaAudienceRow", + "properties": { + "dimensionValues": { + "description": "Each dimension value attribute for an audience user. One dimension value will be added for each dimension column requested.", + "items": { + "$ref": "V1betaAudienceDimensionValue" + }, + "type": "array" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/analyticsdata/v1beta/analyticsdata-gen.go b/analyticsdata/v1beta/analyticsdata-gen.go index 9c20d7284a7..027a61b3917 100644 --- a/analyticsdata/v1beta/analyticsdata-gen.go +++ b/analyticsdata/v1beta/analyticsdata-gen.go @@ -161,11 +161,23 @@ func (s *Service) userAgent() string { func NewPropertiesService(s *Service) *PropertiesService { rs := &PropertiesService{s: s} + rs.AudienceExports = NewPropertiesAudienceExportsService(s) return rs } type PropertiesService struct { s *Service + + AudienceExports *PropertiesAudienceExportsService +} + +func NewPropertiesAudienceExportsService(s *Service) *PropertiesAudienceExportsService { + rs := &PropertiesAudienceExportsService{s: s} + return rs +} + +type PropertiesAudienceExportsService struct { + s *Service } // ActiveMetricRestriction: A metric actively restricted in creating the @@ -205,6 +217,110 @@ func (s *ActiveMetricRestriction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AudienceExport: An audience export is a list of users in an audience +// at the time of the list's creation. One audience may have multiple +// audience exports created for different days. +type AudienceExport struct { + // Audience: Required. The audience resource name. This resource name + // identifies the audience being listed and is shared between the + // Analytics Data & Admin APIs. Format: + // `properties/{property}/audiences/{audience}` + Audience string `json:"audience,omitempty"` + + // AudienceDisplayName: Output only. The descriptive display name for + // this audience. For example, "Purchasers". + AudienceDisplayName string `json:"audienceDisplayName,omitempty"` + + // BeginCreatingTime: Output only. The time when CreateAudienceExport + // was called and the AudienceExport began the `CREATING` state. + BeginCreatingTime string `json:"beginCreatingTime,omitempty"` + + // CreationQuotaTokensCharged: Output only. The total quota tokens + // charged during creation of the AudienceExport. Because this token + // count is based on activity from the `CREATING` state, this tokens + // charged will be fixed once an AudienceExport enters the `ACTIVE` or + // `FAILED` states. + CreationQuotaTokensCharged int64 `json:"creationQuotaTokensCharged,omitempty"` + + // Dimensions: Required. The dimensions requested and displayed in the + // query response. + Dimensions []*V1betaAudienceDimension `json:"dimensions,omitempty"` + + // ErrorMessage: Output only. Error message is populated when an + // audience export fails during creation. A common reason for such a + // failure is quota exhaustion. + ErrorMessage string `json:"errorMessage,omitempty"` + + // Name: Output only. Identifier. The audience export resource name + // assigned during creation. This resource name identifies this + // `AudienceExport`. Format: + // `properties/{property}/audienceExports/{audience_export}` + Name string `json:"name,omitempty"` + + // PercentageCompleted: Output only. The percentage completed for this + // audience export ranging between 0 to 100. + PercentageCompleted float64 `json:"percentageCompleted,omitempty"` + + // RowCount: Output only. The total number of rows in the AudienceExport + // result. + RowCount int64 `json:"rowCount,omitempty"` + + // State: Output only. The current state for this AudienceExport. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state will never be used. + // "CREATING" - The AudienceExport is currently creating and will be + // available in the future. Creating occurs immediately after the + // CreateAudienceExport call. + // "ACTIVE" - The AudienceExport is fully created and ready for + // querying. An AudienceExport is updated to active asynchronously from + // a request; this occurs some time (for example 15 minutes) after the + // initial create call. + // "FAILED" - The AudienceExport failed to be created. It is possible + // that re-requesting this audience export will succeed. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Audience") 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. "Audience") 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 *AudienceExport) MarshalJSON() ([]byte, error) { + type NoMethod AudienceExport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *AudienceExport) UnmarshalJSON(data []byte) error { + type NoMethod AudienceExport + var s1 struct { + PercentageCompleted gensupport.JSONFloat64 `json:"percentageCompleted"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PercentageCompleted = float64(s1.PercentageCompleted) + return nil +} + // AudienceListMetadata: This metadata is currently blank. type AudienceListMetadata struct { } @@ -1225,6 +1341,45 @@ func (s *InListFilter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListAudienceExportsResponse: A list of all audience exports for a +// property. +type ListAudienceExportsResponse struct { + // AudienceExports: Each audience export for a property. + AudienceExports []*AudienceExport `json:"audienceExports,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. "AudienceExports") 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. "AudienceExports") 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 *ListAudienceExportsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAudienceExportsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Metadata: The dimensions, metrics and comparisons currently accepted // in reporting methods. type Metadata struct { @@ -1707,6 +1862,68 @@ func (s *NumericValue) UnmarshalJSON(data []byte) error { return nil } +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OrderBy: Order bys define how rows will be sorted in the response. // For example, ordering rows by descending event count is one ordering, // and ordering rows by the event name string is a different ordering. @@ -2020,6 +2237,102 @@ func (s *PropertyQuota) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// QueryAudienceExportRequest: A request to list users in an audience +// export. +type QueryAudienceExportRequest struct { + // Limit: Optional. The number of rows to return. If unspecified, 10,000 + // rows are returned. The API returns a maximum of 250,000 rows per + // request, no matter how many you ask for. `limit` must be positive. + // The API can also return fewer rows than the requested `limit`, if + // there aren't as many dimension values as the `limit`. To learn more + // about this pagination parameter, see Pagination + // (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + Limit int64 `json:"limit,omitempty,string"` + + // Offset: Optional. The row count of the start row. The first row is + // counted as row 0. When paging, the first request does not specify + // offset; or equivalently, sets offset to 0; the first request returns + // the first `limit` of rows. The second request sets offset to the + // `limit` of the first request; the second request returns the second + // `limit` of rows. To learn more about this pagination parameter, see + // Pagination + // (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + Offset int64 `json:"offset,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Limit") 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. "Limit") 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 *QueryAudienceExportRequest) MarshalJSON() ([]byte, error) { + type NoMethod QueryAudienceExportRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QueryAudienceExportResponse: A list of users in an audience export. +type QueryAudienceExportResponse struct { + // AudienceExport: Configuration data about AudienceExport being + // queried. Returned to help interpret the audience rows in this + // response. For example, the dimensions in this AudienceExport + // correspond to the columns in the AudienceRows. + AudienceExport *AudienceExport `json:"audienceExport,omitempty"` + + // AudienceRows: Rows for each user in an audience export. The number of + // rows in this response will be less than or equal to request's page + // size. + AudienceRows []*V1betaAudienceRow `json:"audienceRows,omitempty"` + + // RowCount: The total number of rows in the AudienceExport result. + // `rowCount` is independent of the number of rows returned in the + // response, the `limit` request parameter, and the `offset` request + // parameter. For example if a query returns 175 rows and includes + // `limit` of 50 in the API request, the response will contain + // `rowCount` of 175 but only 50 rows. To learn more about this + // pagination parameter, see Pagination + // (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + RowCount int64 `json:"rowCount,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AudienceExport") 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. "AudienceExport") 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 *QueryAudienceExportResponse) MarshalJSON() ([]byte, error) { + type NoMethod QueryAudienceExportResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // QuotaStatus: Current state for a particular quota group. type QuotaStatus struct { // Consumed: Quota consumed by this request. @@ -2764,6 +3077,50 @@ func (s *SchemaRestrictionResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "Code") 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 *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StringFilter: The filter for string type StringFilter struct { // CaseSensitive: If true, the string value is case sensitive. @@ -2809,6 +3166,99 @@ func (s *StringFilter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// V1betaAudienceDimension: An audience dimension is a user attribute. +// Specific user attributed are requested and then later returned in the +// `QueryAudienceExportResponse`. +type V1betaAudienceDimension struct { + // DimensionName: Optional. The API name of the dimension. See the API + // Dimensions + // (https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions) + // for the list of dimension names. + DimensionName string `json:"dimensionName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DimensionName") 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. "DimensionName") 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 *V1betaAudienceDimension) MarshalJSON() ([]byte, error) { + type NoMethod V1betaAudienceDimension + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// V1betaAudienceDimensionValue: The value of a dimension. +type V1betaAudienceDimensionValue struct { + // Value: Value as a string if the dimension type is a string. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Value") 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. "Value") 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 *V1betaAudienceDimensionValue) MarshalJSON() ([]byte, error) { + type NoMethod V1betaAudienceDimensionValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// V1betaAudienceRow: Dimension value attributes for the audience user +// row. +type V1betaAudienceRow struct { + // DimensionValues: Each dimension value attribute for an audience user. + // One dimension value will be added for each dimension column + // requested. + DimensionValues []*V1betaAudienceDimensionValue `json:"dimensionValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DimensionValues") 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. "DimensionValues") 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 *V1betaAudienceRow) MarshalJSON() ([]byte, error) { + type NoMethod V1betaAudienceRow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "analyticsdata.properties.batchRunPivotReports": type PropertiesBatchRunPivotReportsCall struct { @@ -3891,3 +4341,695 @@ func (c *PropertiesRunReportCall) Do(opts ...googleapi.CallOption) (*RunReportRe // } } + +// method id "analyticsdata.properties.audienceExports.create": + +type PropertiesAudienceExportsCreateCall struct { + s *Service + parent string + audienceexport *AudienceExport + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an audience export for later retrieval. This method +// quickly returns the audience export's resource name and initiates a +// long running asynchronous request to form an audience export. To +// export the users in an audience export, first create the audience +// export through this method and then send the audience resource name +// to the `QueryAudienceExport` method. See Creating an Audience Export +// (https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) +// for an introduction to Audience Exports with examples. An audience +// export is a snapshot of the users currently in the audience at the +// time of audience export creation. Creating audience exports for one +// audience on different days will return different results as users +// enter and exit the audience. Audiences in Google Analytics 4 allow +// you to segment your users in the ways that are important to your +// business. To learn more, see +// https://support.google.com/analytics/answer/9267572. Audience exports +// contain the users in each audience. Audience Export APIs have some +// methods at alpha and other methods at beta stability. The intention +// is to advance methods to beta stability after some feedback and +// adoption. To give your feedback on this API, complete the Google +// Analytics Audience Export API Feedback +// (https://forms.gle/EeA5u5LW6PEggtCEA) form. +// +// - parent: The parent resource where this audience export will be +// created. Format: `properties/{property}`. +func (r *PropertiesAudienceExportsService) Create(parent string, audienceexport *AudienceExport) *PropertiesAudienceExportsCreateCall { + c := &PropertiesAudienceExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.audienceexport = audienceexport + 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 *PropertiesAudienceExportsCreateCall) Fields(s ...googleapi.Field) *PropertiesAudienceExportsCreateCall { + 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 *PropertiesAudienceExportsCreateCall) Context(ctx context.Context) *PropertiesAudienceExportsCreateCall { + 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 *PropertiesAudienceExportsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesAudienceExportsCreateCall) 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.audienceexport) + 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}/audienceExports") + 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 "analyticsdata.properties.audienceExports.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PropertiesAudienceExportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an audience export for later retrieval. This method quickly returns the audience export's resource name and initiates a long running asynchronous request to form an audience export. To export the users in an audience export, first create the audience export through this method and then send the audience resource name to the `QueryAudienceExport` method. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. An audience export is a snapshot of the users currently in the audience at the time of audience export creation. Creating audience exports for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience exports contain the users in each audience. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + // "flatPath": "v1beta/properties/{propertiesId}/audienceExports", + // "httpMethod": "POST", + // "id": "analyticsdata.properties.audienceExports.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this audience export will be created. Format: `properties/{property}`", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/audienceExports", + // "request": { + // "$ref": "AudienceExport" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + +// method id "analyticsdata.properties.audienceExports.get": + +type PropertiesAudienceExportsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets configuration metadata about a specific audience export. +// This method can be used to understand an audience export after it has +// been created. See Creating an Audience Export +// (https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) +// for an introduction to Audience Exports with examples. Audience +// Export APIs have some methods at alpha and other methods at beta +// stability. The intention is to advance methods to beta stability +// after some feedback and adoption. To give your feedback on this API, +// complete the Google Analytics Audience Export API Feedback +// (https://forms.gle/EeA5u5LW6PEggtCEA) form. +// +// - name: The audience export resource name. Format: +// `properties/{property}/audienceExports/{audience_export}`. +func (r *PropertiesAudienceExportsService) Get(name string) *PropertiesAudienceExportsGetCall { + c := &PropertiesAudienceExportsGetCall{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 *PropertiesAudienceExportsGetCall) Fields(s ...googleapi.Field) *PropertiesAudienceExportsGetCall { + 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 *PropertiesAudienceExportsGetCall) IfNoneMatch(entityTag string) *PropertiesAudienceExportsGetCall { + 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 *PropertiesAudienceExportsGetCall) Context(ctx context.Context) *PropertiesAudienceExportsGetCall { + 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 *PropertiesAudienceExportsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesAudienceExportsGetCall) 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 "analyticsdata.properties.audienceExports.get" call. +// Exactly one of *AudienceExport or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AudienceExport.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 *PropertiesAudienceExportsGetCall) Do(opts ...googleapi.CallOption) (*AudienceExport, 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 := &AudienceExport{ + 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 configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + // "flatPath": "v1beta/properties/{propertiesId}/audienceExports/{audienceExportsId}", + // "httpMethod": "GET", + // "id": "analyticsdata.properties.audienceExports.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The audience export resource name. Format: `properties/{property}/audienceExports/{audience_export}`", + // "location": "path", + // "pattern": "^properties/[^/]+/audienceExports/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "AudienceExport" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + +// method id "analyticsdata.properties.audienceExports.list": + +type PropertiesAudienceExportsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all audience exports for a property. This method can be +// used for you to find and reuse existing audience exports rather than +// creating unnecessary new audience exports. The same audience can have +// multiple audience exports that represent the export of users that +// were in an audience on different days. See Creating an Audience +// Export +// (https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) +// for an introduction to Audience Exports with examples. Audience +// Export APIs have some methods at alpha and other methods at beta +// stability. The intention is to advance methods to beta stability +// after some feedback and adoption. To give your feedback on this API, +// complete the Google Analytics Audience Export API Feedback +// (https://forms.gle/EeA5u5LW6PEggtCEA) form. +// +// - parent: All audience exports for this property will be listed in +// the response. Format: `properties/{property}`. +func (r *PropertiesAudienceExportsService) List(parent string) *PropertiesAudienceExportsListCall { + c := &PropertiesAudienceExportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of audience exports to return. The service may return fewer than this +// value. If unspecified, at most 200 audience exports will be returned. +// The maximum value is 1000 (higher values will be coerced to the +// maximum). +func (c *PropertiesAudienceExportsListCall) PageSize(pageSize int64) *PropertiesAudienceExportsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListAudienceExports` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListAudienceExports` must match the call that provided +// the page token. +func (c *PropertiesAudienceExportsListCall) PageToken(pageToken string) *PropertiesAudienceExportsListCall { + 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 *PropertiesAudienceExportsListCall) Fields(s ...googleapi.Field) *PropertiesAudienceExportsListCall { + 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 *PropertiesAudienceExportsListCall) IfNoneMatch(entityTag string) *PropertiesAudienceExportsListCall { + 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 *PropertiesAudienceExportsListCall) Context(ctx context.Context) *PropertiesAudienceExportsListCall { + 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 *PropertiesAudienceExportsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesAudienceExportsListCall) 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}/audienceExports") + 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 "analyticsdata.properties.audienceExports.list" call. +// Exactly one of *ListAudienceExportsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListAudienceExportsResponse.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 *PropertiesAudienceExportsListCall) Do(opts ...googleapi.CallOption) (*ListAudienceExportsResponse, 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 := &ListAudienceExportsResponse{ + 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 all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new audience exports. The same audience can have multiple audience exports that represent the export of users that were in an audience on different days. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + // "flatPath": "v1beta/properties/{propertiesId}/audienceExports", + // "httpMethod": "GET", + // "id": "analyticsdata.properties.audienceExports.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. The maximum number of audience exports to return. The service may return fewer than this value. If unspecified, at most 200 audience exports will be returned. The maximum value is 1000 (higher values will be coerced to the maximum).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListAudienceExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAudienceExports` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. All audience exports for this property will be listed in the response. Format: `properties/{property}`", + // "location": "path", + // "pattern": "^properties/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/audienceExports", + // "response": { + // "$ref": "ListAudienceExportsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics", + // "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 *PropertiesAudienceExportsListCall) Pages(ctx context.Context, f func(*ListAudienceExportsResponse) 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 "analyticsdata.properties.audienceExports.query": + +type PropertiesAudienceExportsQueryCall struct { + s *Service + name string + queryaudienceexportrequest *QueryAudienceExportRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Query: Retrieves an audience export of users. After creating an +// audience, the users are not immediately available for exporting. +// First, a request to `CreateAudienceExport` is necessary to create an +// audience export of users, and then second, this method is used to +// retrieve the users in the audience export. See Creating an Audience +// Export +// (https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) +// for an introduction to Audience Exports with examples. Audiences in +// Google Analytics 4 allow you to segment your users in the ways that +// are important to your business. To learn more, see +// https://support.google.com/analytics/answer/9267572. Audience Export +// APIs have some methods at alpha and other methods at beta stability. +// The intention is to advance methods to beta stability after some +// feedback and adoption. To give your feedback on this API, complete +// the Google Analytics Audience Export API Feedback +// (https://forms.gle/EeA5u5LW6PEggtCEA) form. +// +// - name: The name of the audience export to retrieve users from. +// Format: `properties/{property}/audienceExports/{audience_export}`. +func (r *PropertiesAudienceExportsService) Query(name string, queryaudienceexportrequest *QueryAudienceExportRequest) *PropertiesAudienceExportsQueryCall { + c := &PropertiesAudienceExportsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.queryaudienceexportrequest = queryaudienceexportrequest + 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 *PropertiesAudienceExportsQueryCall) Fields(s ...googleapi.Field) *PropertiesAudienceExportsQueryCall { + 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 *PropertiesAudienceExportsQueryCall) Context(ctx context.Context) *PropertiesAudienceExportsQueryCall { + 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 *PropertiesAudienceExportsQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesAudienceExportsQueryCall) 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.queryaudienceexportrequest) + 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}:query") + 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 "analyticsdata.properties.audienceExports.query" call. +// Exactly one of *QueryAudienceExportResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *QueryAudienceExportResponse.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 *PropertiesAudienceExportsQueryCall) Do(opts ...googleapi.CallOption) (*QueryAudienceExportResponse, 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 := &QueryAudienceExportResponse{ + 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": "Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to `CreateAudienceExport` is necessary to create an audience export of users, and then second, this method is used to retrieve the users in the audience export. See [Creating an Audience Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics) for an introduction to Audience Exports with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the [Google Analytics Audience Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.", + // "flatPath": "v1beta/properties/{propertiesId}/audienceExports/{audienceExportsId}:query", + // "httpMethod": "POST", + // "id": "analyticsdata.properties.audienceExports.query", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the audience export to retrieve users from. Format: `properties/{property}/audienceExports/{audience_export}`", + // "location": "path", + // "pattern": "^properties/[^/]+/audienceExports/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}:query", + // "request": { + // "$ref": "QueryAudienceExportRequest" + // }, + // "response": { + // "$ref": "QueryAudienceExportResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index c2528dddbf8..d3964a9b3b3 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -291,6 +291,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "enableResourceMonitoring": { + "description": "Enable resource violation monitoring for a workload.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:enableResourceMonitoring", + "httpMethod": "POST", + "id": "assuredworkloads.organizations.locations.workloads.enableResourceMonitoring", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:enableResourceMonitoring", + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets Assured Workload associated with a CRM Node", "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", @@ -566,11 +591,11 @@ } } }, - "revision": "20231110", + "revision": "20231201", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { - "description": "Request for acknowledging the violation Next Id: 5", + "description": "Request for acknowledging the violation", "id": "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest", "properties": { "acknowledgeType": { @@ -711,6 +736,12 @@ }, "type": "object" }, + "GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse": { + "description": "Response for EnableResourceMonitoring endpoint.", + "id": "GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudAssuredworkloadsV1ListViolationsResponse": { "description": "Response of ListViolations endpoint.", "id": "GoogleCloudAssuredworkloadsV1ListViolationsResponse", diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index 8decac259fe..2601e18a571 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -209,7 +209,7 @@ type OrganizationsLocationsWorkloadsViolationsService struct { } // GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest: Request for -// acknowledging the violation Next Id: 5 +// acknowledging the violation type GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest struct { // AcknowledgeType: Optional. Acknowledge type of specified violation. // @@ -409,6 +409,14 @@ func (s *GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata) MarshalJS return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse: +// Response for EnableResourceMonitoring endpoint. +type GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // GoogleCloudAssuredworkloadsV1ListViolationsResponse: Response of // ListViolations endpoint. type GoogleCloudAssuredworkloadsV1ListViolationsResponse struct { @@ -2581,6 +2589,144 @@ func (c *OrganizationsLocationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOpt } +// method id "assuredworkloads.organizations.locations.workloads.enableResourceMonitoring": + +type OrganizationsLocationsWorkloadsEnableResourceMonitoringCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EnableResourceMonitoring: Enable resource violation monitoring for a +// workload. +// +// - name: The `name` field is used to identify the workload. Format: +// organizations/{org_id}/locations/{location_id}/workloads/{workload_i +// d}. +func (r *OrganizationsLocationsWorkloadsService) EnableResourceMonitoring(name string) *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall { + c := &OrganizationsLocationsWorkloadsEnableResourceMonitoringCall{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 *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall) Fields(s ...googleapi.Field) *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall { + 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 *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall) Context(ctx context.Context) *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall { + 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 *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enableResourceMonitoring") + 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 "assuredworkloads.organizations.locations.workloads.enableResourceMonitoring" call. +// Exactly one of +// *GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse.ServerR +// esponse.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 *OrganizationsLocationsWorkloadsEnableResourceMonitoringCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse, 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 := &GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse{ + 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": "Enable resource violation monitoring for a workload.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:enableResourceMonitoring", + // "httpMethod": "POST", + // "id": "assuredworkloads.organizations.locations.workloads.enableResourceMonitoring", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The `name` field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:enableResourceMonitoring", + // "response": { + // "$ref": "GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "assuredworkloads.organizations.locations.workloads.get": type OrganizationsLocationsWorkloadsGetCall struct { diff --git a/assuredworkloads/v1beta1/assuredworkloads-api.json b/assuredworkloads/v1beta1/assuredworkloads-api.json index 8b4e204936d..b3e3e0e29c4 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-api.json +++ b/assuredworkloads/v1beta1/assuredworkloads-api.json @@ -563,11 +563,11 @@ } } }, - "revision": "20231110", + "revision": "20231201", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest": { - "description": "Request for acknowledging the violation Next Id: 5", + "description": "Request for acknowledging the violation", "id": "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest", "properties": { "acknowledgeType": { diff --git a/assuredworkloads/v1beta1/assuredworkloads-gen.go b/assuredworkloads/v1beta1/assuredworkloads-gen.go index fda61e1d8cd..56266945cf5 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-gen.go +++ b/assuredworkloads/v1beta1/assuredworkloads-gen.go @@ -209,7 +209,7 @@ type OrganizationsLocationsWorkloadsViolationsService struct { } // GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest: -// Request for acknowledging the violation Next Id: 5 +// Request for acknowledging the violation type GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest struct { // AcknowledgeType: Optional. Acknowledge type of specified violation. // diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index dfed560ec20..9b1b348bf1d 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -538,6 +538,11 @@ "required": true, "type": "string" }, + "showGroups": { + "description": "Optional. When `true`, also returns memberships associated with a Google Group, in addition to other types of memberships. If a filter is set, Google Group memberships that don't match the filter criteria aren't returned.", + "location": "query", + "type": "boolean" + }, "showInvited": { "description": "Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don't match the filter criteria aren't returned. Currently requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", "location": "query", @@ -957,7 +962,7 @@ } } }, - "revision": "20231121", + "revision": "20231130", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -2707,6 +2712,17 @@ }, "type": "object" }, + "Group": { + "description": "A Google Group in Google Chat.", + "id": "Group", + "properties": { + "name": { + "description": "Resource name for a Google Group. Represents a [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in Cloud Identity Groups API. Format: groups/{group}", + "type": "string" + } + }, + "type": "object" + }, "HostAppDataSourceMarkup": { "description": "Chat apps only. For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu.", "id": "HostAppDataSourceMarkup", @@ -3051,11 +3067,14 @@ "id": "Membership", "properties": { "createTime": { - "description": "Output only. The creation time of the membership, such as when a member joined or was invited to join a space.", + "description": "Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. [Developer Preview](https://developers.google.com/workspace/preview): This field is output only, except when used to import historical memberships in import mode spaces.", "format": "google-datetime", - "readOnly": true, "type": "string" }, + "groupMember": { + "$ref": "Group", + "description": "The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported." + }, "member": { "$ref": "User", "description": "The Google Chat user or app the membership corresponds to. If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [user](https://developers.google.com/chat/api/reference/rest/v1/User) `name` and `type`." diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 659592aea08..4050d418040 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -3488,6 +3488,36 @@ func (s *GoogleAppsCardV1Widgets) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Group: A Google Group in Google Chat. +type Group struct { + // Name: Resource name for a Google Group. Represents a group + // (https://cloud.google.com/identity/docs/reference/rest/v1/groups) in + // Cloud Identity Groups API. Format: groups/{group} + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Group) MarshalJSON() ([]byte, error) { + type NoMethod Group + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HostAppDataSourceMarkup: Chat apps only. For a `SelectionInput` // widget that uses a multiselect menu, a data source from a Google // Workspace application. The data source populates selection items for @@ -3993,10 +4023,18 @@ func (s *Media) MarshalJSON() ([]byte, error) { // whether a user or Chat app is invited to, part of, or absent from a // space. type Membership struct { - // CreateTime: Output only. The creation time of the membership, such as - // when a member joined or was invited to join a space. + // CreateTime: Optional. Immutable. The creation time of the membership, + // such as when a member joined or was invited to join a space. + // Developer Preview (https://developers.google.com/workspace/preview): + // This field is output only, except when used to import historical + // memberships in import mode spaces. CreateTime string `json:"createTime,omitempty"` + // GroupMember: The Google Group the membership corresponds to. Only + // supports read operations. Other operations, like creating or updating + // a membership, aren't currently supported. + GroupMember *Group `json:"groupMember,omitempty"` + // Member: The Google Chat user or app the membership corresponds to. If // your Chat app authenticates as a user // (https://developers.google.com/chat/api/guides/auth/users), the @@ -7398,6 +7436,15 @@ func (c *SpacesMembersListCall) PageToken(pageToken string) *SpacesMembersListCa return c } +// ShowGroups sets the optional parameter "showGroups": When `true`, +// also returns memberships associated with a Google Group, in addition +// to other types of memberships. If a filter is set, Google Group +// memberships that don't match the filter criteria aren't returned. +func (c *SpacesMembersListCall) ShowGroups(showGroups bool) *SpacesMembersListCall { + c.urlParams_.Set("showGroups", fmt.Sprint(showGroups)) + return c +} + // ShowInvited sets the optional parameter "showInvited": When `true`, // also returns memberships associated with invited members, in addition // to other types of memberships. If a filter is set, invited @@ -7539,6 +7586,11 @@ func (c *SpacesMembersListCall) Do(opts ...googleapi.CallOption) (*ListMembershi // "required": true, // "type": "string" // }, + // "showGroups": { + // "description": "Optional. When `true`, also returns memberships associated with a Google Group, in addition to other types of memberships. If a filter is set, Google Group memberships that don't match the filter criteria aren't returned.", + // "location": "query", + // "type": "boolean" + // }, // "showInvited": { // "description": "Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don't match the filter criteria aren't returned. Currently requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", // "location": "query", diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index 96fed0b9e67..4709e7a9fa7 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -478,6 +478,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "listenEvent": { + "description": "ListenEvent listens to the event.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:listenEvent", + "httpMethod": "POST", + "id": "connectors.projects.locations.connections.listenEvent", + "parameterOrder": [ + "resourcePath" + ], + "parameters": { + "resourcePath": { + "description": "Required. Resource path for request.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resourcePath}:listenEvent", + "request": { + "$ref": "ListenEventRequest" + }, + "response": { + "$ref": "ListenEventResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "patch": { "description": "Updates the parameters of a single Connection.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", @@ -2321,7 +2349,7 @@ } } }, - "revision": "20231106", + "revision": "20231126", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -2395,7 +2423,8 @@ "OAUTH2_JWT_BEARER", "OAUTH2_CLIENT_CREDENTIALS", "SSH_PUBLIC_KEY", - "OAUTH2_AUTH_CODE_FLOW" + "OAUTH2_AUTH_CODE_FLOW", + "GOOGLE_AUTHENTICATION" ], "enumDescriptions": [ "Authentication type not specified.", @@ -2403,7 +2432,8 @@ "JSON Web Token (JWT) Profile for Oauth 2.0 Authorization Grant based authentication", "Oauth 2.0 Client Credentials Grant Authentication", "SSH Public Key Authentication", - "Oauth 2.0 Authorization Code Flow" + "Oauth 2.0 Authorization Code Flow", + "Google authentication" ], "type": "string" }, @@ -2446,7 +2476,8 @@ "OAUTH2_JWT_BEARER", "OAUTH2_CLIENT_CREDENTIALS", "SSH_PUBLIC_KEY", - "OAUTH2_AUTH_CODE_FLOW" + "OAUTH2_AUTH_CODE_FLOW", + "GOOGLE_AUTHENTICATION" ], "enumDescriptions": [ "Authentication type not specified.", @@ -2454,7 +2485,8 @@ "JSON Web Token (JWT) Profile for Oauth 2.0 Authorization Grant based authentication", "Oauth 2.0 Client Credentials Grant Authentication", "SSH Public Key Authentication", - "Oauth 2.0 Authorization Code Flow" + "Oauth 2.0 Authorization Code Flow", + "Google authentication" ], "type": "string" }, @@ -2844,6 +2876,10 @@ "readOnly": true, "type": "array" }, + "errorMessage": { + "description": "Error message for users.", + "type": "string" + }, "name": { "description": "Output only. Resource name. Format: projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata", "readOnly": true, @@ -3279,25 +3315,6 @@ "description": "Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources", "type": "object" }, - "launchStage": { - "description": "Output only. Launch stage.", - "enum": [ - "LAUNCH_STAGE_UNSPECIFIED", - "PREVIEW", - "GA", - "DEPRECATED", - "PRIVATE_PREVIEW" - ], - "enumDescriptions": [ - "LAUNCH_STAGE_UNSPECIFIED.", - "PREVIEW.", - "GA.", - "DEPRECATED.", - "PRIVATE_PREVIEW." - ], - "readOnly": true, - "type": "string" - }, "logo": { "description": "Optional. Logo of the resource.", "type": "string" @@ -3349,22 +3366,12 @@ "readOnly": true, "type": "string" }, - "specLocation": { - "description": "Optional. Location of the custom connector spec.", + "serviceAccount": { + "description": "Required. Service account needed for runtime plane to access Custom Connector secrets.", "type": "string" }, - "type": { - "description": "Required. Type of the customConnector.", - "enum": [ - "CUSTOM_CONNECTOR_TYPE_UNSPECIFIED", - "OPEN_API", - "PROTO" - ], - "enumDescriptions": [ - "Connector type is not specified.", - "OpenAPI connector.", - "Proto connector." - ], + "specLocation": { + "description": "Optional. Location of the custom connector spec.", "type": "string" }, "updateTime": { @@ -3791,10 +3798,6 @@ "$ref": "AuthConfig", "description": "Auth details for the webhook adapter." }, - "encryptionKey": { - "$ref": "ConfigVariable", - "description": "Encryption key (can be either Google managed or CMEK)." - }, "enrichmentEnabled": { "description": "Enrichment Enabled.", "type": "boolean" @@ -3803,6 +3806,10 @@ "description": "Optional. Ingress endpoint of the event listener. This is used only when private connectivity is enabled.", "type": "string" }, + "listenerAuthConfig": { + "$ref": "AuthConfig", + "description": "Optional. Auth details for the event listener." + }, "privateConnectivityEnabled": { "description": "Optional. Private Connectivity Enabled.", "type": "boolean" @@ -3866,6 +3873,13 @@ "description": "Is Eventing Supported.", "type": "boolean" }, + "listenerAuthConfigTemplates": { + "description": "ListenerAuthConfigTemplates represents the auth values for the event listener.", + "items": { + "$ref": "AuthConfigTemplate" + }, + "type": "array" + }, "registrationDestinationConfig": { "$ref": "DestinationConfigTemplate", "description": "Registration host destination config template." @@ -5066,6 +5080,27 @@ }, "type": "object" }, + "ListenEventRequest": { + "description": "Expected request for ListenEvent API.", + "id": "ListenEventRequest", + "properties": { + "payload": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Request payload.", + "type": "object" + } + }, + "type": "object" + }, + "ListenEventResponse": { + "description": "Expected response for ListenEvent API.", + "id": "ListenEventResponse", + "properties": {}, + "type": "object" + }, "Location": { "description": "A resource that represents a Google Cloud location.", "id": "Location", diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 9471ce49e8d..4f21924e9d3 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -468,6 +468,7 @@ type AuthConfig struct { // Authentication // "SSH_PUBLIC_KEY" - SSH Public Key Authentication // "OAUTH2_AUTH_CODE_FLOW" - Oauth 2.0 Authorization Code Flow + // "GOOGLE_AUTHENTICATION" - Google authentication AuthType string `json:"authType,omitempty"` // Oauth2AuthCodeFlow: Oauth2AuthCodeFlow. @@ -526,6 +527,7 @@ type AuthConfigTemplate struct { // Authentication // "SSH_PUBLIC_KEY" - SSH Public Key Authentication // "OAUTH2_AUTH_CODE_FLOW" - Oauth 2.0 Authorization Code Flow + // "GOOGLE_AUTHENTICATION" - Google authentication AuthType string `json:"authType,omitempty"` // ConfigVariableTemplates: Config variables to describe an `AuthConfig` @@ -979,6 +981,9 @@ type ConnectionSchemaMetadata struct { // Entities: Output only. List of entity names. Entities []string `json:"entities,omitempty"` + // ErrorMessage: Error message for users. + ErrorMessage string `json:"errorMessage,omitempty"` + // Name: Output only. Resource name. Format: // projects/{project}/locations/{location}/connections/{connection}/conne // ctionSchemaMetadata @@ -1434,16 +1439,6 @@ type CustomConnector struct { // https://cloud.google.com/compute/docs/labeling-resources Labels map[string]string `json:"labels,omitempty"` - // LaunchStage: Output only. Launch stage. - // - // Possible values: - // "LAUNCH_STAGE_UNSPECIFIED" - LAUNCH_STAGE_UNSPECIFIED. - // "PREVIEW" - PREVIEW. - // "GA" - GA. - // "DEPRECATED" - DEPRECATED. - // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. - LaunchStage string `json:"launchStage,omitempty"` - // Logo: Optional. Logo of the resource. Logo string `json:"logo,omitempty"` @@ -1510,18 +1505,13 @@ type CustomConnectorVersion struct { // ctor}/customConnectorVersions/{custom_connector_version} Name string `json:"name,omitempty"` + // ServiceAccount: Required. Service account needed for runtime plane to + // access Custom Connector secrets. + ServiceAccount string `json:"serviceAccount,omitempty"` + // SpecLocation: Optional. Location of the custom connector spec. SpecLocation string `json:"specLocation,omitempty"` - // Type: Required. Type of the customConnector. - // - // Possible values: - // "CUSTOM_CONNECTOR_TYPE_UNSPECIFIED" - Connector type is not - // specified. - // "OPEN_API" - OpenAPI connector. - // "PROTO" - Proto connector. - Type string `json:"type,omitempty"` - // UpdateTime: Output only. Updated time. UpdateTime string `json:"updateTime,omitempty"` @@ -2139,9 +2129,6 @@ type EventingConfig struct { // AuthConfig: Auth details for the webhook adapter. AuthConfig *AuthConfig `json:"authConfig,omitempty"` - // EncryptionKey: Encryption key (can be either Google managed or CMEK). - EncryptionKey *ConfigVariable `json:"encryptionKey,omitempty"` - // EnrichmentEnabled: Enrichment Enabled. EnrichmentEnabled bool `json:"enrichmentEnabled,omitempty"` @@ -2150,6 +2137,9 @@ type EventingConfig struct { // enabled. EventsListenerIngressEndpoint string `json:"eventsListenerIngressEndpoint,omitempty"` + // ListenerAuthConfig: Optional. Auth details for the event listener. + ListenerAuthConfig *AuthConfig `json:"listenerAuthConfig,omitempty"` + // PrivateConnectivityEnabled: Optional. Private Connectivity Enabled. PrivateConnectivityEnabled bool `json:"privateConnectivityEnabled,omitempty"` @@ -2217,6 +2207,10 @@ type EventingConfigTemplate struct { // IsEventingSupported: Is Eventing Supported. IsEventingSupported bool `json:"isEventingSupported,omitempty"` + // ListenerAuthConfigTemplates: ListenerAuthConfigTemplates represents + // the auth values for the event listener. + ListenerAuthConfigTemplates []*AuthConfigTemplate `json:"listenerAuthConfigTemplates,omitempty"` + // RegistrationDestinationConfig: Registration host destination config // template. RegistrationDestinationConfig *DestinationConfigTemplate `json:"registrationDestinationConfig,omitempty"` @@ -3613,6 +3607,41 @@ func (s *ListRuntimeEntitySchemasResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListenEventRequest: Expected request for ListenEvent API. +type ListenEventRequest struct { + // Payload: Optional. Request payload. + Payload googleapi.RawMessage `json:"payload,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Payload") 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. "Payload") 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 *ListenEventRequest) MarshalJSON() ([]byte, error) { + type NoMethod ListenEventRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListenEventResponse: Expected response for ListenEvent API. +type ListenEventResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // Location: A resource that represents a Google Cloud location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby @@ -7081,6 +7110,148 @@ func (c *ProjectsLocationsConnectionsListCall) Pages(ctx context.Context, f func } } +// method id "connectors.projects.locations.connections.listenEvent": + +type ProjectsLocationsConnectionsListenEventCall struct { + s *Service + resourcePath string + listeneventrequest *ListenEventRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ListenEvent: ListenEvent listens to the event. +// +// - resourcePath: Resource path for request. +func (r *ProjectsLocationsConnectionsService) ListenEvent(resourcePath string, listeneventrequest *ListenEventRequest) *ProjectsLocationsConnectionsListenEventCall { + c := &ProjectsLocationsConnectionsListenEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resourcePath = resourcePath + c.listeneventrequest = listeneventrequest + 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 *ProjectsLocationsConnectionsListenEventCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsListenEventCall { + 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 *ProjectsLocationsConnectionsListenEventCall) Context(ctx context.Context) *ProjectsLocationsConnectionsListenEventCall { + 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 *ProjectsLocationsConnectionsListenEventCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsListenEventCall) 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.listeneventrequest) + 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/{+resourcePath}:listenEvent") + 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{ + "resourcePath": c.resourcePath, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "connectors.projects.locations.connections.listenEvent" call. +// Exactly one of *ListenEventResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListenEventResponse.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 *ProjectsLocationsConnectionsListenEventCall) Do(opts ...googleapi.CallOption) (*ListenEventResponse, 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 := &ListenEventResponse{ + 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": "ListenEvent listens to the event.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:listenEvent", + // "httpMethod": "POST", + // "id": "connectors.projects.locations.connections.listenEvent", + // "parameterOrder": [ + // "resourcePath" + // ], + // "parameters": { + // "resourcePath": { + // "description": "Required. Resource path for request.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resourcePath}:listenEvent", + // "request": { + // "$ref": "ListenEventRequest" + // }, + // "response": { + // "$ref": "ListenEventResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "connectors.projects.locations.connections.patch": type ProjectsLocationsConnectionsPatchCall struct { diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 8736f4ee1ba..4f3cc1a5fe0 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -4815,70 +4815,6 @@ "https://www.googleapis.com/auth/content" ] } - }, - "resources": { - "repricingreports": { - "methods": { - "list": { - "description": "Lists the metrics report for a given Repricing product.", - "flatPath": "{merchantId}/productstatuses/{productId}/repricingreports", - "httpMethod": "GET", - "id": "content.productstatuses.repricingreports.list", - "parameterOrder": [ - "merchantId", - "productId" - ], - "parameters": { - "endDate": { - "description": "Gets Repricing reports on and before this date in the merchant's timezone. You can only retrieve data up to 7 days ago (default) or earlier. Format is YYYY-MM-DD.", - "location": "query", - "type": "string" - }, - "merchantId": { - "description": "Required. Id of the merchant who owns the Repricing rule.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "Maximum number of days of reports to return. There can be more than one rule report returned per day. For example, if 3 rule types got applied to the same product within a 24-hour period, then a page_size of 1 will return 3 rule reports. The page size defaults to 50 and values above 1000 are coerced to 1000. This service may return fewer days of reports than this value, for example, if the time between your start and end date is less than the page size.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.", - "location": "query", - "type": "string" - }, - "productId": { - "description": "Required. Id of the Repricing product. Also known as the [REST_ID](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id)", - "location": "path", - "required": true, - "type": "string" - }, - "ruleId": { - "description": "Id of the Repricing rule. If specified, only gets this rule's reports.", - "location": "query", - "type": "string" - }, - "startDate": { - "description": "Gets Repricing reports on and after this date in the merchant's timezone, up to one year ago. Do not use a start date later than 7 days ago (default). Format is YYYY-MM-DD.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/productstatuses/{productId}/repricingreports", - "response": { - "$ref": "ListRepricingProductReportsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - } } }, "promotions": { @@ -5417,244 +5353,6 @@ } } }, - "repricingrules": { - "methods": { - "create": { - "description": "Creates a repricing rule for your Merchant Center account.", - "flatPath": "{merchantId}/repricingrules", - "httpMethod": "POST", - "id": "content.repricingrules.create", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant who owns the repricing rule.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "ruleId": { - "description": "Required. The id of the rule to create.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/repricingrules", - "request": { - "$ref": "RepricingRule" - }, - "response": { - "$ref": "RepricingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "delete": { - "description": "Deletes a repricing rule in your Merchant Center account.", - "flatPath": "{merchantId}/repricingrules/{ruleId}", - "httpMethod": "DELETE", - "id": "content.repricingrules.delete", - "parameterOrder": [ - "merchantId", - "ruleId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant who owns the repricing rule.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "ruleId": { - "description": "Required. The id of the rule to Delete.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/repricingrules/{ruleId}", - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Retrieves a repricing rule from your Merchant Center account.", - "flatPath": "{merchantId}/repricingrules/{ruleId}", - "httpMethod": "GET", - "id": "content.repricingrules.get", - "parameterOrder": [ - "merchantId", - "ruleId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant who owns the repricing rule.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "ruleId": { - "description": "Required. The id of the rule to retrieve.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/repricingrules/{ruleId}", - "response": { - "$ref": "RepricingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists the repricing rules in your Merchant Center account.", - "flatPath": "{merchantId}/repricingrules", - "httpMethod": "GET", - "id": "content.repricingrules.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "countryCode": { - "description": "[CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (for example, \"US\"), used as a filter on repricing rules.", - "location": "query", - "type": "string" - }, - "languageCode": { - "description": "The two-letter ISO 639-1 language code associated with the repricing rule, used as a filter.", - "location": "query", - "type": "string" - }, - "merchantId": { - "description": "Required. The id of the merchant who owns the repricing rule.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The maximum number of repricing rules to return. The service may return fewer than this value. If unspecified, at most 50 rules will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListRepricingRules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRepricingRules` must match the call that provided the page token.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/repricingrules", - "response": { - "$ref": "ListRepricingRulesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "patch": { - "description": "Updates a repricing rule in your Merchant Center account. All mutable fields will be overwritten in each update request. In each update, you must provide all required mutable fields, or an error will be thrown. If you do not provide an optional field in the update request, if that field currently exists, it will be deleted from the rule.", - "flatPath": "{merchantId}/repricingrules/{ruleId}", - "httpMethod": "PATCH", - "id": "content.repricingrules.patch", - "parameterOrder": [ - "merchantId", - "ruleId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant who owns the repricing rule.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "ruleId": { - "description": "Required. The id of the rule to update.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/repricingrules/{ruleId}", - "request": { - "$ref": "RepricingRule" - }, - "response": { - "$ref": "RepricingRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - }, - "resources": { - "repricingreports": { - "methods": { - "list": { - "description": "*Deprecated*: New merchants can't start using this service. Lists the metrics report for a given Repricing rule.", - "flatPath": "{merchantId}/repricingrules/{ruleId}/repricingreports", - "httpMethod": "GET", - "id": "content.repricingrules.repricingreports.list", - "parameterOrder": [ - "merchantId", - "ruleId" - ], - "parameters": { - "endDate": { - "description": "Gets Repricing reports on and before this date in the merchant's timezone. You can only retrieve data up to 7 days ago (default) or earlier. Format: YYYY-MM-DD.", - "location": "query", - "type": "string" - }, - "merchantId": { - "description": "Required. Id of the merchant who owns the Repricing rule.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "Maximum number of daily reports to return. Each report includes data from a single 24-hour period. The page size defaults to 50 and values above 1000 are coerced to 1000. This service may return fewer days than this value, for example, if the time between your start and end date is less than page size.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.", - "location": "query", - "type": "string" - }, - "ruleId": { - "description": "Required. Id of the Repricing rule.", - "location": "path", - "required": true, - "type": "string" - }, - "startDate": { - "description": "Gets Repricing reports on and after this date in the merchant's timezone, up to one year ago. Do not use a start date later than 7 days ago (default). Format: YYYY-MM-DD.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/repricingrules/{ruleId}/repricingreports", - "response": { - "$ref": "ListRepricingRuleReportsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - } - } - }, "returnaddress": { "methods": { "custombatch": { @@ -6488,7 +6186,7 @@ } } }, - "revision": "20231128", + "revision": "20231203", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -9975,44 +9673,6 @@ }, "type": "object" }, - "InapplicabilityDetails": { - "description": "Map of inapplicability details.", - "id": "InapplicabilityDetails", - "properties": { - "inapplicableCount": { - "description": "Count of this inapplicable reason code.", - "format": "int64", - "type": "string" - }, - "inapplicableReason": { - "description": "Reason code this rule was not applicable.", - "enum": [ - "INAPPLICABLE_REASON_UNSPECIFIED", - "CANNOT_BEAT_BUYBOX_WINNER", - "ALREADY_WINNING_BUYBOX", - "TRIUMPHED_OVER_BY_SAME_TYPE_RULE", - "TRIUMPHED_OVER_BY_OTHER_RULE_ON_OFFER", - "RESTRICTIONS_NOT_MET", - "UNCATEGORIZED", - "INVALID_AUTO_PRICE_MIN", - "INVALID_FLOOR_CONFIG" - ], - "enumDescriptions": [ - "Default value. Should not be used.", - "The rule set for this product cannot beat the buybox winner.", - "This product can already win the buybox without rule.", - "Another rule of the same type takes precedence over this one.", - "Another rule of a different type takes precedence over this one.", - "The rule restrictions are not met. For example, this may be the case if the calculated rule price is lower than floor price in the restriction.", - "The reason is not categorized to any known reason.", - "The auto_pricing_min_price is invalid. For example, it is missing or \u003c 0.", - "The floor defined in the rule is invalid. For example, it has the wrong sign which results in a floor \u003c 0." - ], - "type": "string" - } - }, - "type": "object" - }, "InsertCheckoutSettingsRequest": { "description": "Request message for the `InsertCheckoutSettings` method.", "id": "InsertCheckoutSettingsRequest", @@ -10647,60 +10307,6 @@ }, "type": "object" }, - "ListRepricingProductReportsResponse": { - "description": "Response message for the ListRepricingProductReports method.", - "id": "ListRepricingProductReportsResponse", - "properties": { - "nextPageToken": { - "description": "A token for retrieving the next page. Its absence means there is no subsequent page.", - "type": "string" - }, - "repricingProductReports": { - "description": "Periodic reports for the given Repricing product.", - "items": { - "$ref": "RepricingProductReport" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListRepricingRuleReportsResponse": { - "description": "Response message for the ListRepricingRuleReports method.", - "id": "ListRepricingRuleReportsResponse", - "properties": { - "nextPageToken": { - "description": "A token for retrieving the next page. Its absence means there is no subsequent page.", - "type": "string" - }, - "repricingRuleReports": { - "description": "Daily reports for the given Repricing rule.", - "items": { - "$ref": "RepricingRuleReport" - }, - "type": "array" - } - }, - "type": "object" - }, - "ListRepricingRulesResponse": { - "description": "Response message for the `ListRepricingRules` method.", - "id": "ListRepricingRulesResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "repricingRules": { - "description": "The rules from the specified merchant.", - "items": { - "$ref": "RepricingRule" - }, - "type": "array" - } - }, - "type": "object" - }, "ListReturnPolicyOnlineResponse": { "description": "Response message for the `ListReturnPolicyOnline` method.", "id": "ListReturnPolicyOnlineResponse", @@ -16553,386 +16159,6 @@ }, "type": "object" }, - "RepricingProductReport": { - "description": "Resource that represents a daily Repricing product report. Each report contains stats for a single type of Repricing rule for a single product on a given day. If there are multiple rules of the same type for the product on that day, the report lists all the rules by rule ids, combines the stats, and paginates the results by date. To retrieve the stats of a particular rule, provide the rule_id in the request.", - "id": "RepricingProductReport", - "properties": { - "applicationCount": { - "description": "Total count of Repricer applications. This value captures how many times the rule of this type was applied to this product during this reporting period.", - "format": "int64", - "type": "string" - }, - "buyboxWinningProductStats": { - "$ref": "RepricingProductReportBuyboxWinningProductStats", - "deprecated": true, - "description": "Stats specific to buybox winning rules for product report (deprecated)." - }, - "date": { - "$ref": "Date", - "description": "Date of the stats in this report. The report starts and ends according to the merchant's timezone." - }, - "highWatermark": { - "$ref": "PriceAmount", - "description": "Maximum displayed price after repriced during this reporting period." - }, - "inapplicabilityDetails": { - "description": "List of all reasons the rule did not apply to the product during the specified reporting period.", - "items": { - "$ref": "InapplicabilityDetails" - }, - "type": "array" - }, - "lowWatermark": { - "$ref": "PriceAmount", - "description": "Minimum displayed price after repriced during this reporting period." - }, - "orderItemCount": { - "description": "Total unit count of impacted products ordered while the rule was active on the date of the report. This count includes all orders that were started while the rule was active, even if the rule was no longer active when the order was completed.", - "format": "int32", - "type": "integer" - }, - "ruleIds": { - "description": "Ids of the Repricing rule for this report.", - "items": { - "type": "string" - }, - "type": "array" - }, - "totalGmv": { - "$ref": "PriceAmount", - "description": "Total GMV generated by impacted products while the rule was active on the date of the report. This value includes all orders that were started while the rule was active, even if the rule was no longer active when the order was completed." - }, - "type": { - "description": "Type of the rule.", - "enum": [ - "REPRICING_RULE_TYPE_UNSPECIFIED", - "TYPE_STATS_BASED", - "TYPE_COGS_BASED", - "TYPE_SALES_VOLUME_BASED", - "TYPE_COMPETITIVE_PRICE" - ], - "enumDescriptions": [ - "Unused.", - "Statistical measurement based rules among Google SA merchants. If this rule is chosen, repricer will adjust the offer price based on statistical metrics (currently only min is available) among other merchants who sell the same product. Details need to be provdided in the RuleDefinition.", - "Cost of goods sale based rule. Repricer will adjust the offer price based on the offer's sale cost which is provided by the merchant.", - "Sales volume based rule. Repricer will adjust the offer price based on the offer's sales volume in the past period of time defined within the rule.", - "Competitive price rule. Repricer will adjust the offer price based on the min price from a list of unnamed big competitors." - ], - "type": "string" - } - }, - "type": "object" - }, - "RepricingProductReportBuyboxWinningProductStats": { - "description": "Stats specific to buybox winning rules for product report.", - "id": "RepricingProductReportBuyboxWinningProductStats", - "properties": { - "buyboxWinsCount": { - "description": "Number of times this product won the buybox with these rules during this time period.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "RepricingRule": { - "description": "*Deprecated*: New merchants can't start using this resource. Represents a repricing rule. A repricing rule is used by shopping serving to adjust transactable offer prices if conditions are met.", - "id": "RepricingRule", - "properties": { - "cogsBasedRule": { - "$ref": "RepricingRuleCostOfGoodsSaleRule", - "description": "The rule definition for TYPE_COGS_BASED. Required when the rule type is TYPE_COGS_BASED." - }, - "countryCode": { - "description": "Required. Immutable. [CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (for example, \"US\").", - "type": "string" - }, - "effectiveTimePeriod": { - "$ref": "RepricingRuleEffectiveTime", - "description": "Required. Time period when the rule should take effect." - }, - "eligibleOfferMatcher": { - "$ref": "RepricingRuleEligibleOfferMatcher", - "description": "Required. Match criteria for the eligible offers." - }, - "languageCode": { - "description": "Required. Immutable. The two-letter ISO 639-1 language code associated with the repricing rule.", - "type": "string" - }, - "merchantId": { - "description": "Output only. Immutable. Merchant that owns the repricing rule.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "paused": { - "description": "Represents whether a rule is paused. A paused rule will behave like a non-paused rule within CRUD operations, with the major difference that a paused rule will not be evaluated and will have no effect on offers.", - "type": "boolean" - }, - "restriction": { - "$ref": "RepricingRuleRestriction", - "description": "Required. Restriction of the rule appliance." - }, - "ruleId": { - "description": "Output only. Immutable. The ID to uniquely identify each repricing rule.", - "readOnly": true, - "type": "string" - }, - "statsBasedRule": { - "$ref": "RepricingRuleStatsBasedRule", - "description": "The rule definition for TYPE_STATS_BASED. Required when the rule type is TYPE_STATS_BASED." - }, - "title": { - "description": "The title for the rule.", - "type": "string" - }, - "type": { - "description": "Required. Immutable. The type of the rule.", - "enum": [ - "REPRICING_RULE_TYPE_UNSPECIFIED", - "TYPE_STATS_BASED", - "TYPE_COGS_BASED", - "TYPE_SALES_VOLUME_BASED", - "TYPE_COMPETITIVE_PRICE" - ], - "enumDescriptions": [ - "Unused.", - "Statistical measurement based rules among Google SA merchants. If this rule is chosen, repricer will adjust the offer price based on statistical metrics (currently only min is available) among other merchants who sell the same product. Details need to be provdided in the RuleDefinition.", - "Cost of goods sale based rule. Repricer will adjust the offer price based on the offer's sale cost which is provided by the merchant.", - "Sales volume based rule. Repricer will adjust the offer price based on the offer's sales volume in the past period of time defined within the rule.", - "Competitive price rule. Repricer will adjust the offer price based on the min price from a list of unnamed big competitors." - ], - "type": "string" - } - }, - "type": "object" - }, - "RepricingRuleCostOfGoodsSaleRule": { - "description": "A repricing rule that changes the sale price based on cost of goods sale.", - "id": "RepricingRuleCostOfGoodsSaleRule", - "properties": { - "percentageDelta": { - "description": "The percent change against the COGS. Ex: 20 would mean to set the adjusted price 1.2X of the COGS data.", - "format": "int32", - "type": "integer" - }, - "priceDelta": { - "description": "The price delta against the COGS. For example, 2 means $2 more of the COGS.", - "type": "string" - } - }, - "type": "object" - }, - "RepricingRuleEffectiveTime": { - "id": "RepricingRuleEffectiveTime", - "properties": { - "fixedTimePeriods": { - "description": "A list of fixed time periods combined with OR. The maximum number of entries is limited to 5.", - "items": { - "$ref": "RepricingRuleEffectiveTimeFixedTimePeriod" - }, - "type": "array" - } - }, - "type": "object" - }, - "RepricingRuleEffectiveTimeFixedTimePeriod": { - "description": "Definition of a fixed time period.", - "id": "RepricingRuleEffectiveTimeFixedTimePeriod", - "properties": { - "endTime": { - "description": "The end time (exclusive) of the period. It can only be hour granularity.", - "format": "google-datetime", - "type": "string" - }, - "startTime": { - "description": "The start time (inclusive) of the period. It can only be hour granularity.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "RepricingRuleEligibleOfferMatcher": { - "description": "Matcher that specifies eligible offers. When the USE_FEED_ATTRIBUTE option is selected, only the repricing_rule_id attribute on the product feed is used to specify offer-rule mapping. When the CUSTOM_FILTER option is selected, only the *_matcher fields are used to filter the offers for offer-rule mapping. If the CUSTOM_FILTER option is selected, an offer needs to satisfy each custom filter matcher to be eligible for a rule. Size limit: the sum of the number of entries in all the matchers should not exceed 20. For example, there can be 15 product ids and 5 brands, but not 10 product ids and 11 brands.", - "id": "RepricingRuleEligibleOfferMatcher", - "properties": { - "brandMatcher": { - "$ref": "RepricingRuleEligibleOfferMatcherStringMatcher", - "description": "Filter by the brand." - }, - "itemGroupIdMatcher": { - "$ref": "RepricingRuleEligibleOfferMatcherStringMatcher", - "description": "Filter by the item group id." - }, - "matcherOption": { - "description": "Determines whether to use the custom matchers or the product feed attribute \"repricing_rule_id\" to specify offer-rule mapping.", - "enum": [ - "MATCHER_OPTION_UNSPECIFIED", - "MATCHER_OPTION_CUSTOM_FILTER", - "MATCHER_OPTION_USE_FEED_ATTRIBUTE", - "MATCHER_OPTION_ALL_PRODUCTS" - ], - "enumDescriptions": [ - "Unused.", - "Use custom filters.", - "Use repricing_rule_id feed attribute on the product resource to specify offer-rule mapping.", - "Matching all products." - ], - "type": "string" - }, - "offerIdMatcher": { - "$ref": "RepricingRuleEligibleOfferMatcherStringMatcher", - "description": "Filter by the offer id." - }, - "skipWhenOnPromotion": { - "description": "When true, the rule won't be applied to offers with active promotions.", - "type": "boolean" - } - }, - "type": "object" - }, - "RepricingRuleEligibleOfferMatcherStringMatcher": { - "description": "Matcher by string attributes.", - "id": "RepricingRuleEligibleOfferMatcherStringMatcher", - "properties": { - "strAttributes": { - "description": "String attributes, as long as such attribute of an offer is one of the string attribute values, the offer is considered as passing the matcher. The string matcher checks an offer for inclusivity in the string attributes, not equality. Only literal string matching is supported, no regular expressions.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RepricingRuleReport": { - "description": "Resource that represents a daily Repricing rule report. Next ID: 11", - "id": "RepricingRuleReport", - "properties": { - "buyboxWinningRuleStats": { - "$ref": "RepricingRuleReportBuyboxWinningRuleStats", - "deprecated": true, - "description": "Stats specific to buybox winning rules for rule report (deprecated)." - }, - "date": { - "$ref": "Date", - "description": "Date of the stats in this report. The report starts and ends according to the merchant's timezone." - }, - "impactedProducts": { - "description": "List of product ids that are impacted by this rule during this reporting period. Out of stock products and products not searched for by customers are examples of non-impacted products.", - "items": { - "type": "string" - }, - "type": "array" - }, - "inapplicabilityDetails": { - "description": "List of all reasons the rule did not apply to the inapplicable products during the specified reporting period.", - "items": { - "$ref": "InapplicabilityDetails" - }, - "type": "array" - }, - "inapplicableProducts": { - "description": "List of product ids that are inapplicable to this rule during this reporting period. To get the inapplicable reason for a specific product, see RepricingProductReport.", - "items": { - "type": "string" - }, - "type": "array" - }, - "orderItemCount": { - "description": "Total unit count of impacted products ordered while the rule was active on the date of the report. This count includes all orders that were started while the rule was active, even if the rule was no longer active when the order was completed.", - "format": "int32", - "type": "integer" - }, - "ruleId": { - "description": "Id of the Repricing rule for this report.", - "type": "string" - }, - "totalGmv": { - "$ref": "PriceAmount", - "description": "Total GMV generated by impacted products while the rule was active on the date of the report. This value includes all orders that were started while the rule was active, even if the rule was no longer active when the order was completed." - }, - "type": { - "description": "Type of the rule.", - "enum": [ - "REPRICING_RULE_TYPE_UNSPECIFIED", - "TYPE_STATS_BASED", - "TYPE_COGS_BASED", - "TYPE_SALES_VOLUME_BASED", - "TYPE_COMPETITIVE_PRICE" - ], - "enumDescriptions": [ - "Unused.", - "Statistical measurement based rules among Google SA merchants. If this rule is chosen, repricer will adjust the offer price based on statistical metrics (currently only min is available) among other merchants who sell the same product. Details need to be provdided in the RuleDefinition.", - "Cost of goods sale based rule. Repricer will adjust the offer price based on the offer's sale cost which is provided by the merchant.", - "Sales volume based rule. Repricer will adjust the offer price based on the offer's sales volume in the past period of time defined within the rule.", - "Competitive price rule. Repricer will adjust the offer price based on the min price from a list of unnamed big competitors." - ], - "type": "string" - } - }, - "type": "object" - }, - "RepricingRuleReportBuyboxWinningRuleStats": { - "description": "Stats specific to buybox winning rules for rule report.", - "id": "RepricingRuleReportBuyboxWinningRuleStats", - "properties": { - "buyboxWonProductCount": { - "description": "Number of unique products that won the buybox with this rule during this period of time.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "RepricingRuleRestriction": { - "description": "Definition of a rule restriction. At least one of the following needs to be true: (1) use_auto_pricing_min_price is true (2) floor.price_delta exists (3) floor.percentage_delta exists If floor.price_delta and floor.percentage_delta are both set on a rule, the highest value will be chosen by the Repricer. In other words, for a product with a price of $50, if the `floor.percentage_delta` is \"-10\" and the floor.price_delta is \"-12\", the offer price will only be lowered $5 (10% lower than the original offer price).", - "id": "RepricingRuleRestriction", - "properties": { - "floor": { - "$ref": "RepricingRuleRestrictionBoundary", - "description": "The inclusive floor lower bound. The repricing rule only applies when new price \u003e= floor." - }, - "useAutoPricingMinPrice": { - "description": "If true, use the AUTO_PRICING_MIN_PRICE offer attribute as the lower bound of the rule. If use_auto_pricing_min_price is true, then only offers with `AUTO_PRICING_MIN_PRICE` existing on the offer will get Repricer treatment, even if a floor value is set on the rule. Also, if use_auto_pricing_min_price is true, the floor restriction will be ignored.", - "type": "boolean" - } - }, - "type": "object" - }, - "RepricingRuleRestrictionBoundary": { - "description": "Definition of a boundary.", - "id": "RepricingRuleRestrictionBoundary", - "properties": { - "percentageDelta": { - "description": "The percentage delta relative to the offer selling price. This field is signed. It must be negative in floor. When it is used in floor, it should be \u003e -100. For example, if an offer is selling at $10 and this field is -30 in floor, the repricing rule only applies if the calculated new price is \u003e= $7.", - "format": "int32", - "type": "integer" - }, - "priceDelta": { - "description": "The price micros relative to the offer selling price. This field is signed. It must be negative in floor. For example, if an offer is selling at $10 and this field is -$2 in floor, the repricing rule only applies if the calculated new price is \u003e= $8.", - "type": "string" - } - }, - "type": "object" - }, - "RepricingRuleStatsBasedRule": { - "description": "Definition of stats based rule.", - "id": "RepricingRuleStatsBasedRule", - "properties": { - "percentageDelta": { - "description": "The percent change against the price target. Valid from 0 to 100 inclusively.", - "format": "int32", - "type": "integer" - }, - "priceDelta": { - "description": "The price delta against the above price target. A positive value means the price should be adjusted to be above statistical measure, and a negative value means below. Currency code must not be included.", - "type": "string" - } - }, - "type": "object" - }, "RequestPhoneVerificationRequest": { "description": "Request message for the RequestPhoneVerification method.", "id": "RequestPhoneVerificationRequest", diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 5d5fbdf85d9..cc448ef6372 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -161,7 +161,6 @@ func New(client *http.Client) (*APIService, error) { s.Regionalinventory = NewRegionalinventoryService(s) s.Regions = NewRegionsService(s) s.Reports = NewReportsService(s) - s.Repricingrules = NewRepricingrulesService(s) s.Returnaddress = NewReturnaddressService(s) s.Returnpolicy = NewReturnpolicyService(s) s.Returnpolicyonline = NewReturnpolicyonlineService(s) @@ -237,8 +236,6 @@ type APIService struct { Reports *ReportsService - Repricingrules *RepricingrulesService - Returnaddress *ReturnaddressService Returnpolicy *ReturnpolicyService @@ -521,23 +518,11 @@ type ProductsService struct { func NewProductstatusesService(s *APIService) *ProductstatusesService { rs := &ProductstatusesService{s: s} - rs.Repricingreports = NewProductstatusesRepricingreportsService(s) return rs } type ProductstatusesService struct { s *APIService - - Repricingreports *ProductstatusesRepricingreportsService -} - -func NewProductstatusesRepricingreportsService(s *APIService) *ProductstatusesRepricingreportsService { - rs := &ProductstatusesRepricingreportsService{s: s} - return rs -} - -type ProductstatusesRepricingreportsService struct { - s *APIService } func NewPromotionsService(s *APIService) *PromotionsService { @@ -603,27 +588,6 @@ type ReportsService struct { s *APIService } -func NewRepricingrulesService(s *APIService) *RepricingrulesService { - rs := &RepricingrulesService{s: s} - rs.Repricingreports = NewRepricingrulesRepricingreportsService(s) - return rs -} - -type RepricingrulesService struct { - s *APIService - - Repricingreports *RepricingrulesRepricingreportsService -} - -func NewRepricingrulesRepricingreportsService(s *APIService) *RepricingrulesRepricingreportsService { - rs := &RepricingrulesRepricingreportsService{s: s} - return rs -} - -type RepricingrulesRepricingreportsService struct { - s *APIService -} - func NewReturnaddressService(s *APIService) *ReturnaddressService { rs := &ReturnaddressService{s: s} return rs @@ -6504,59 +6468,6 @@ func (s *HolidaysHoliday) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InapplicabilityDetails: Map of inapplicability details. -type InapplicabilityDetails struct { - // InapplicableCount: Count of this inapplicable reason code. - InapplicableCount int64 `json:"inapplicableCount,omitempty,string"` - - // InapplicableReason: Reason code this rule was not applicable. - // - // Possible values: - // "INAPPLICABLE_REASON_UNSPECIFIED" - Default value. Should not be - // used. - // "CANNOT_BEAT_BUYBOX_WINNER" - The rule set for this product cannot - // beat the buybox winner. - // "ALREADY_WINNING_BUYBOX" - This product can already win the buybox - // without rule. - // "TRIUMPHED_OVER_BY_SAME_TYPE_RULE" - Another rule of the same type - // takes precedence over this one. - // "TRIUMPHED_OVER_BY_OTHER_RULE_ON_OFFER" - Another rule of a - // different type takes precedence over this one. - // "RESTRICTIONS_NOT_MET" - The rule restrictions are not met. For - // example, this may be the case if the calculated rule price is lower - // than floor price in the restriction. - // "UNCATEGORIZED" - The reason is not categorized to any known - // reason. - // "INVALID_AUTO_PRICE_MIN" - The auto_pricing_min_price is invalid. - // For example, it is missing or < 0. - // "INVALID_FLOOR_CONFIG" - The floor defined in the rule is invalid. - // For example, it has the wrong sign which results in a floor < 0. - InapplicableReason string `json:"inapplicableReason,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InapplicableCount") - // 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. "InapplicableCount") 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 *InapplicabilityDetails) MarshalJSON() ([]byte, error) { - type NoMethod InapplicabilityDetails - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // InsertCheckoutSettingsRequest: Request message for the // `InsertCheckoutSettings` method. type InsertCheckoutSettingsRequest struct { @@ -7806,119 +7717,6 @@ func (s *ListRegionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListRepricingProductReportsResponse: Response message for the -// ListRepricingProductReports method. -type ListRepricingProductReportsResponse struct { - // NextPageToken: A token for retrieving the next page. Its absence - // means there is no subsequent page. - NextPageToken string `json:"nextPageToken,omitempty"` - - // RepricingProductReports: Periodic reports for the given Repricing - // product. - RepricingProductReports []*RepricingProductReport `json:"repricingProductReports,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 *ListRepricingProductReportsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListRepricingProductReportsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListRepricingRuleReportsResponse: Response message for the -// ListRepricingRuleReports method. -type ListRepricingRuleReportsResponse struct { - // NextPageToken: A token for retrieving the next page. Its absence - // means there is no subsequent page. - NextPageToken string `json:"nextPageToken,omitempty"` - - // RepricingRuleReports: Daily reports for the given Repricing rule. - RepricingRuleReports []*RepricingRuleReport `json:"repricingRuleReports,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 *ListRepricingRuleReportsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListRepricingRuleReportsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// ListRepricingRulesResponse: Response message for the -// `ListRepricingRules` method. -type ListRepricingRulesResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` - - // RepricingRules: The rules from the specified merchant. - RepricingRules []*RepricingRule `json:"repricingRules,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 *ListRepricingRulesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListRepricingRulesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ListReturnPolicyOnlineResponse: Response message for the // `ListReturnPolicyOnline` method. type ListReturnPolicyOnlineResponse struct { @@ -17531,654 +17329,6 @@ func (s *ReportRow) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RepricingProductReport: Resource that represents a daily Repricing -// product report. Each report contains stats for a single type of -// Repricing rule for a single product on a given day. If there are -// multiple rules of the same type for the product on that day, the -// report lists all the rules by rule ids, combines the stats, and -// paginates the results by date. To retrieve the stats of a particular -// rule, provide the rule_id in the request. -type RepricingProductReport struct { - // ApplicationCount: Total count of Repricer applications. This value - // captures how many times the rule of this type was applied to this - // product during this reporting period. - ApplicationCount int64 `json:"applicationCount,omitempty,string"` - - // BuyboxWinningProductStats: Stats specific to buybox winning rules for - // product report (deprecated). - BuyboxWinningProductStats *RepricingProductReportBuyboxWinningProductStats `json:"buyboxWinningProductStats,omitempty"` - - // Date: Date of the stats in this report. The report starts and ends - // according to the merchant's timezone. - Date *Date `json:"date,omitempty"` - - // HighWatermark: Maximum displayed price after repriced during this - // reporting period. - HighWatermark *PriceAmount `json:"highWatermark,omitempty"` - - // InapplicabilityDetails: List of all reasons the rule did not apply to - // the product during the specified reporting period. - InapplicabilityDetails []*InapplicabilityDetails `json:"inapplicabilityDetails,omitempty"` - - // LowWatermark: Minimum displayed price after repriced during this - // reporting period. - LowWatermark *PriceAmount `json:"lowWatermark,omitempty"` - - // OrderItemCount: Total unit count of impacted products ordered while - // the rule was active on the date of the report. This count includes - // all orders that were started while the rule was active, even if the - // rule was no longer active when the order was completed. - OrderItemCount int64 `json:"orderItemCount,omitempty"` - - // RuleIds: Ids of the Repricing rule for this report. - RuleIds []string `json:"ruleIds,omitempty"` - - // TotalGmv: Total GMV generated by impacted products while the rule was - // active on the date of the report. This value includes all orders that - // were started while the rule was active, even if the rule was no - // longer active when the order was completed. - TotalGmv *PriceAmount `json:"totalGmv,omitempty"` - - // Type: Type of the rule. - // - // Possible values: - // "REPRICING_RULE_TYPE_UNSPECIFIED" - Unused. - // "TYPE_STATS_BASED" - Statistical measurement based rules among - // Google SA merchants. If this rule is chosen, repricer will adjust the - // offer price based on statistical metrics (currently only min is - // available) among other merchants who sell the same product. Details - // need to be provdided in the RuleDefinition. - // "TYPE_COGS_BASED" - Cost of goods sale based rule. Repricer will - // adjust the offer price based on the offer's sale cost which is - // provided by the merchant. - // "TYPE_SALES_VOLUME_BASED" - Sales volume based rule. Repricer will - // adjust the offer price based on the offer's sales volume in the past - // period of time defined within the rule. - // "TYPE_COMPETITIVE_PRICE" - Competitive price rule. Repricer will - // adjust the offer price based on the min price from a list of unnamed - // big competitors. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ApplicationCount") 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. "ApplicationCount") 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 *RepricingProductReport) MarshalJSON() ([]byte, error) { - type NoMethod RepricingProductReport - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RepricingProductReportBuyboxWinningProductStats: Stats specific to -// buybox winning rules for product report. -type RepricingProductReportBuyboxWinningProductStats struct { - // BuyboxWinsCount: Number of times this product won the buybox with - // these rules during this time period. - BuyboxWinsCount int64 `json:"buyboxWinsCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BuyboxWinsCount") 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. "BuyboxWinsCount") 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 *RepricingProductReportBuyboxWinningProductStats) MarshalJSON() ([]byte, error) { - type NoMethod RepricingProductReportBuyboxWinningProductStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RepricingRule: *Deprecated*: New merchants can't start using this -// resource. Represents a repricing rule. A repricing rule is used by -// shopping serving to adjust transactable offer prices if conditions -// are met. -type RepricingRule struct { - // CogsBasedRule: The rule definition for TYPE_COGS_BASED. Required when - // the rule type is TYPE_COGS_BASED. - CogsBasedRule *RepricingRuleCostOfGoodsSaleRule `json:"cogsBasedRule,omitempty"` - - // CountryCode: Required. Immutable. CLDR country code - // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - // (for example, "US"). - CountryCode string `json:"countryCode,omitempty"` - - // EffectiveTimePeriod: Required. Time period when the rule should take - // effect. - EffectiveTimePeriod *RepricingRuleEffectiveTime `json:"effectiveTimePeriod,omitempty"` - - // EligibleOfferMatcher: Required. Match criteria for the eligible - // offers. - EligibleOfferMatcher *RepricingRuleEligibleOfferMatcher `json:"eligibleOfferMatcher,omitempty"` - - // LanguageCode: Required. Immutable. The two-letter ISO 639-1 language - // code associated with the repricing rule. - LanguageCode string `json:"languageCode,omitempty"` - - // MerchantId: Output only. Immutable. Merchant that owns the repricing - // rule. - MerchantId int64 `json:"merchantId,omitempty,string"` - - // Paused: Represents whether a rule is paused. A paused rule will - // behave like a non-paused rule within CRUD operations, with the major - // difference that a paused rule will not be evaluated and will have no - // effect on offers. - Paused bool `json:"paused,omitempty"` - - // Restriction: Required. Restriction of the rule appliance. - Restriction *RepricingRuleRestriction `json:"restriction,omitempty"` - - // RuleId: Output only. Immutable. The ID to uniquely identify each - // repricing rule. - RuleId string `json:"ruleId,omitempty"` - - // StatsBasedRule: The rule definition for TYPE_STATS_BASED. Required - // when the rule type is TYPE_STATS_BASED. - StatsBasedRule *RepricingRuleStatsBasedRule `json:"statsBasedRule,omitempty"` - - // Title: The title for the rule. - Title string `json:"title,omitempty"` - - // Type: Required. Immutable. The type of the rule. - // - // Possible values: - // "REPRICING_RULE_TYPE_UNSPECIFIED" - Unused. - // "TYPE_STATS_BASED" - Statistical measurement based rules among - // Google SA merchants. If this rule is chosen, repricer will adjust the - // offer price based on statistical metrics (currently only min is - // available) among other merchants who sell the same product. Details - // need to be provdided in the RuleDefinition. - // "TYPE_COGS_BASED" - Cost of goods sale based rule. Repricer will - // adjust the offer price based on the offer's sale cost which is - // provided by the merchant. - // "TYPE_SALES_VOLUME_BASED" - Sales volume based rule. Repricer will - // adjust the offer price based on the offer's sales volume in the past - // period of time defined within the rule. - // "TYPE_COMPETITIVE_PRICE" - Competitive price rule. Repricer will - // adjust the offer price based on the min price from a list of unnamed - // big competitors. - Type string `json:"type,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CogsBasedRule") 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. "CogsBasedRule") 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 *RepricingRule) MarshalJSON() ([]byte, error) { - type NoMethod RepricingRule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RepricingRuleCostOfGoodsSaleRule: A repricing rule that changes the -// sale price based on cost of goods sale. -type RepricingRuleCostOfGoodsSaleRule struct { - // PercentageDelta: The percent change against the COGS. Ex: 20 would - // mean to set the adjusted price 1.2X of the COGS data. - PercentageDelta int64 `json:"percentageDelta,omitempty"` - - // PriceDelta: The price delta against the COGS. For example, 2 means $2 - // more of the COGS. - PriceDelta string `json:"priceDelta,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PercentageDelta") 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. "PercentageDelta") 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 *RepricingRuleCostOfGoodsSaleRule) MarshalJSON() ([]byte, error) { - type NoMethod RepricingRuleCostOfGoodsSaleRule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type RepricingRuleEffectiveTime struct { - // FixedTimePeriods: A list of fixed time periods combined with OR. The - // maximum number of entries is limited to 5. - FixedTimePeriods []*RepricingRuleEffectiveTimeFixedTimePeriod `json:"fixedTimePeriods,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FixedTimePeriods") 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. "FixedTimePeriods") 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 *RepricingRuleEffectiveTime) MarshalJSON() ([]byte, error) { - type NoMethod RepricingRuleEffectiveTime - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RepricingRuleEffectiveTimeFixedTimePeriod: Definition of a fixed time -// period. -type RepricingRuleEffectiveTimeFixedTimePeriod struct { - // EndTime: The end time (exclusive) of the period. It can only be hour - // granularity. - EndTime string `json:"endTime,omitempty"` - - // StartTime: The start time (inclusive) of the period. It can only be - // hour granularity. - StartTime string `json:"startTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EndTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EndTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *RepricingRuleEffectiveTimeFixedTimePeriod) MarshalJSON() ([]byte, error) { - type NoMethod RepricingRuleEffectiveTimeFixedTimePeriod - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RepricingRuleEligibleOfferMatcher: Matcher that specifies eligible -// offers. When the USE_FEED_ATTRIBUTE option is selected, only the -// repricing_rule_id attribute on the product feed is used to specify -// offer-rule mapping. When the CUSTOM_FILTER option is selected, only -// the *_matcher fields are used to filter the offers for offer-rule -// mapping. If the CUSTOM_FILTER option is selected, an offer needs to -// satisfy each custom filter matcher to be eligible for a rule. Size -// limit: the sum of the number of entries in all the matchers should -// not exceed 20. For example, there can be 15 product ids and 5 brands, -// but not 10 product ids and 11 brands. -type RepricingRuleEligibleOfferMatcher struct { - // BrandMatcher: Filter by the brand. - BrandMatcher *RepricingRuleEligibleOfferMatcherStringMatcher `json:"brandMatcher,omitempty"` - - // ItemGroupIdMatcher: Filter by the item group id. - ItemGroupIdMatcher *RepricingRuleEligibleOfferMatcherStringMatcher `json:"itemGroupIdMatcher,omitempty"` - - // MatcherOption: Determines whether to use the custom matchers or the - // product feed attribute "repricing_rule_id" to specify offer-rule - // mapping. - // - // Possible values: - // "MATCHER_OPTION_UNSPECIFIED" - Unused. - // "MATCHER_OPTION_CUSTOM_FILTER" - Use custom filters. - // "MATCHER_OPTION_USE_FEED_ATTRIBUTE" - Use repricing_rule_id feed - // attribute on the product resource to specify offer-rule mapping. - // "MATCHER_OPTION_ALL_PRODUCTS" - Matching all products. - MatcherOption string `json:"matcherOption,omitempty"` - - // OfferIdMatcher: Filter by the offer id. - OfferIdMatcher *RepricingRuleEligibleOfferMatcherStringMatcher `json:"offerIdMatcher,omitempty"` - - // SkipWhenOnPromotion: When true, the rule won't be applied to offers - // with active promotions. - SkipWhenOnPromotion bool `json:"skipWhenOnPromotion,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BrandMatcher") 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. "BrandMatcher") 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 *RepricingRuleEligibleOfferMatcher) MarshalJSON() ([]byte, error) { - type NoMethod RepricingRuleEligibleOfferMatcher - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RepricingRuleEligibleOfferMatcherStringMatcher: Matcher by string -// attributes. -type RepricingRuleEligibleOfferMatcherStringMatcher struct { - // StrAttributes: String attributes, as long as such attribute of an - // offer is one of the string attribute values, the offer is considered - // as passing the matcher. The string matcher checks an offer for - // inclusivity in the string attributes, not equality. Only literal - // string matching is supported, no regular expressions. - StrAttributes []string `json:"strAttributes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "StrAttributes") 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. "StrAttributes") 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 *RepricingRuleEligibleOfferMatcherStringMatcher) MarshalJSON() ([]byte, error) { - type NoMethod RepricingRuleEligibleOfferMatcherStringMatcher - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RepricingRuleReport: Resource that represents a daily Repricing rule -// report. Next ID: 11 -type RepricingRuleReport struct { - // BuyboxWinningRuleStats: Stats specific to buybox winning rules for - // rule report (deprecated). - BuyboxWinningRuleStats *RepricingRuleReportBuyboxWinningRuleStats `json:"buyboxWinningRuleStats,omitempty"` - - // Date: Date of the stats in this report. The report starts and ends - // according to the merchant's timezone. - Date *Date `json:"date,omitempty"` - - // ImpactedProducts: List of product ids that are impacted by this rule - // during this reporting period. Out of stock products and products not - // searched for by customers are examples of non-impacted products. - ImpactedProducts []string `json:"impactedProducts,omitempty"` - - // InapplicabilityDetails: List of all reasons the rule did not apply to - // the inapplicable products during the specified reporting period. - InapplicabilityDetails []*InapplicabilityDetails `json:"inapplicabilityDetails,omitempty"` - - // InapplicableProducts: List of product ids that are inapplicable to - // this rule during this reporting period. To get the inapplicable - // reason for a specific product, see RepricingProductReport. - InapplicableProducts []string `json:"inapplicableProducts,omitempty"` - - // OrderItemCount: Total unit count of impacted products ordered while - // the rule was active on the date of the report. This count includes - // all orders that were started while the rule was active, even if the - // rule was no longer active when the order was completed. - OrderItemCount int64 `json:"orderItemCount,omitempty"` - - // RuleId: Id of the Repricing rule for this report. - RuleId string `json:"ruleId,omitempty"` - - // TotalGmv: Total GMV generated by impacted products while the rule was - // active on the date of the report. This value includes all orders that - // were started while the rule was active, even if the rule was no - // longer active when the order was completed. - TotalGmv *PriceAmount `json:"totalGmv,omitempty"` - - // Type: Type of the rule. - // - // Possible values: - // "REPRICING_RULE_TYPE_UNSPECIFIED" - Unused. - // "TYPE_STATS_BASED" - Statistical measurement based rules among - // Google SA merchants. If this rule is chosen, repricer will adjust the - // offer price based on statistical metrics (currently only min is - // available) among other merchants who sell the same product. Details - // need to be provdided in the RuleDefinition. - // "TYPE_COGS_BASED" - Cost of goods sale based rule. Repricer will - // adjust the offer price based on the offer's sale cost which is - // provided by the merchant. - // "TYPE_SALES_VOLUME_BASED" - Sales volume based rule. Repricer will - // adjust the offer price based on the offer's sales volume in the past - // period of time defined within the rule. - // "TYPE_COMPETITIVE_PRICE" - Competitive price rule. Repricer will - // adjust the offer price based on the min price from a list of unnamed - // big competitors. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BuyboxWinningRuleStats") 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. "BuyboxWinningRuleStats") - // 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 *RepricingRuleReport) MarshalJSON() ([]byte, error) { - type NoMethod RepricingRuleReport - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RepricingRuleReportBuyboxWinningRuleStats: Stats specific to buybox -// winning rules for rule report. -type RepricingRuleReportBuyboxWinningRuleStats struct { - // BuyboxWonProductCount: Number of unique products that won the buybox - // with this rule during this period of time. - BuyboxWonProductCount int64 `json:"buyboxWonProductCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "BuyboxWonProductCount") 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. "BuyboxWonProductCount") 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 *RepricingRuleReportBuyboxWinningRuleStats) MarshalJSON() ([]byte, error) { - type NoMethod RepricingRuleReportBuyboxWinningRuleStats - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RepricingRuleRestriction: Definition of a rule restriction. At least -// one of the following needs to be true: (1) use_auto_pricing_min_price -// is true (2) floor.price_delta exists (3) floor.percentage_delta -// exists If floor.price_delta and floor.percentage_delta are both set -// on a rule, the highest value will be chosen by the Repricer. In other -// words, for a product with a price of $50, if the -// `floor.percentage_delta` is "-10" and the floor.price_delta is "-12", -// the offer price will only be lowered $5 (10% lower than the original -// offer price). -type RepricingRuleRestriction struct { - // Floor: The inclusive floor lower bound. The repricing rule only - // applies when new price >= floor. - Floor *RepricingRuleRestrictionBoundary `json:"floor,omitempty"` - - // UseAutoPricingMinPrice: If true, use the AUTO_PRICING_MIN_PRICE offer - // attribute as the lower bound of the rule. If - // use_auto_pricing_min_price is true, then only offers with - // `AUTO_PRICING_MIN_PRICE` existing on the offer will get Repricer - // treatment, even if a floor value is set on the rule. Also, if - // use_auto_pricing_min_price is true, the floor restriction will be - // ignored. - UseAutoPricingMinPrice bool `json:"useAutoPricingMinPrice,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Floor") 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. "Floor") 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 *RepricingRuleRestriction) MarshalJSON() ([]byte, error) { - type NoMethod RepricingRuleRestriction - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RepricingRuleRestrictionBoundary: Definition of a boundary. -type RepricingRuleRestrictionBoundary struct { - // PercentageDelta: The percentage delta relative to the offer selling - // price. This field is signed. It must be negative in floor. When it is - // used in floor, it should be > -100. For example, if an offer is - // selling at $10 and this field is -30 in floor, the repricing rule - // only applies if the calculated new price is >= $7. - PercentageDelta int64 `json:"percentageDelta,omitempty"` - - // PriceDelta: The price micros relative to the offer selling price. - // This field is signed. It must be negative in floor. For example, if - // an offer is selling at $10 and this field is -$2 in floor, the - // repricing rule only applies if the calculated new price is >= $8. - PriceDelta string `json:"priceDelta,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PercentageDelta") 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. "PercentageDelta") 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 *RepricingRuleRestrictionBoundary) MarshalJSON() ([]byte, error) { - type NoMethod RepricingRuleRestrictionBoundary - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// RepricingRuleStatsBasedRule: Definition of stats based rule. -type RepricingRuleStatsBasedRule struct { - // PercentageDelta: The percent change against the price target. Valid - // from 0 to 100 inclusively. - PercentageDelta int64 `json:"percentageDelta,omitempty"` - - // PriceDelta: The price delta against the above price target. A - // positive value means the price should be adjusted to be above - // statistical measure, and a negative value means below. Currency code - // must not be included. - PriceDelta string `json:"priceDelta,omitempty"` - - // ForceSendFields is a list of field names (e.g. "PercentageDelta") 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. "PercentageDelta") 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 *RepricingRuleStatsBasedRule) MarshalJSON() ([]byte, error) { - type NoMethod RepricingRuleStatsBasedRule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // RequestPhoneVerificationRequest: Request message for the // RequestPhoneVerification method. type RequestPhoneVerificationRequest struct { @@ -42977,258 +42127,6 @@ func (c *ProductstatusesListCall) Pages(ctx context.Context, f func(*Productstat } } -// method id "content.productstatuses.repricingreports.list": - -type ProductstatusesRepricingreportsListCall struct { - s *APIService - merchantId int64 - productId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the metrics report for a given Repricing product. -// -// - merchantId: Id of the merchant who owns the Repricing rule. -// - productId: Id of the Repricing product. Also known as the REST_ID -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id). -func (r *ProductstatusesRepricingreportsService) List(merchantId int64, productId string) *ProductstatusesRepricingreportsListCall { - c := &ProductstatusesRepricingreportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.productId = productId - return c -} - -// EndDate sets the optional parameter "endDate": Gets Repricing reports -// on and before this date in the merchant's timezone. You can only -// retrieve data up to 7 days ago (default) or earlier. Format is -// YYYY-MM-DD. -func (c *ProductstatusesRepricingreportsListCall) EndDate(endDate string) *ProductstatusesRepricingreportsListCall { - c.urlParams_.Set("endDate", endDate) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// days of reports to return. There can be more than one rule report -// returned per day. For example, if 3 rule types got applied to the -// same product within a 24-hour period, then a page_size of 1 will -// return 3 rule reports. The page size defaults to 50 and values above -// 1000 are coerced to 1000. This service may return fewer days of -// reports than this value, for example, if the time between your start -// and end date is less than the page size. -func (c *ProductstatusesRepricingreportsListCall) PageSize(pageSize int64) *ProductstatusesRepricingreportsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Token (if -// provided) to retrieve the subsequent page. All other parameters must -// match the original call that provided the page token. -func (c *ProductstatusesRepricingreportsListCall) PageToken(pageToken string) *ProductstatusesRepricingreportsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// RuleId sets the optional parameter "ruleId": Id of the Repricing -// rule. If specified, only gets this rule's reports. -func (c *ProductstatusesRepricingreportsListCall) RuleId(ruleId string) *ProductstatusesRepricingreportsListCall { - c.urlParams_.Set("ruleId", ruleId) - return c -} - -// StartDate sets the optional parameter "startDate": Gets Repricing -// reports on and after this date in the merchant's timezone, up to one -// year ago. Do not use a start date later than 7 days ago (default). -// Format is YYYY-MM-DD. -func (c *ProductstatusesRepricingreportsListCall) StartDate(startDate string) *ProductstatusesRepricingreportsListCall { - c.urlParams_.Set("startDate", startDate) - 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 *ProductstatusesRepricingreportsListCall) Fields(s ...googleapi.Field) *ProductstatusesRepricingreportsListCall { - 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 *ProductstatusesRepricingreportsListCall) IfNoneMatch(entityTag string) *ProductstatusesRepricingreportsListCall { - 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 *ProductstatusesRepricingreportsListCall) Context(ctx context.Context) *ProductstatusesRepricingreportsListCall { - 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 *ProductstatusesRepricingreportsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProductstatusesRepricingreportsListCall) 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, "{merchantId}/productstatuses/{productId}/repricingreports") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "productId": c.productId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.productstatuses.repricingreports.list" call. -// Exactly one of *ListRepricingProductReportsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListRepricingProductReportsResponse.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 *ProductstatusesRepricingreportsListCall) Do(opts ...googleapi.CallOption) (*ListRepricingProductReportsResponse, 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 := &ListRepricingProductReportsResponse{ - 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 the metrics report for a given Repricing product.", - // "flatPath": "{merchantId}/productstatuses/{productId}/repricingreports", - // "httpMethod": "GET", - // "id": "content.productstatuses.repricingreports.list", - // "parameterOrder": [ - // "merchantId", - // "productId" - // ], - // "parameters": { - // "endDate": { - // "description": "Gets Repricing reports on and before this date in the merchant's timezone. You can only retrieve data up to 7 days ago (default) or earlier. Format is YYYY-MM-DD.", - // "location": "query", - // "type": "string" - // }, - // "merchantId": { - // "description": "Required. Id of the merchant who owns the Repricing rule.", - // "format": "int64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of days of reports to return. There can be more than one rule report returned per day. For example, if 3 rule types got applied to the same product within a 24-hour period, then a page_size of 1 will return 3 rule reports. The page size defaults to 50 and values above 1000 are coerced to 1000. This service may return fewer days of reports than this value, for example, if the time between your start and end date is less than the page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "productId": { - // "description": "Required. Id of the Repricing product. Also known as the [REST_ID](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id)", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ruleId": { - // "description": "Id of the Repricing rule. If specified, only gets this rule's reports.", - // "location": "query", - // "type": "string" - // }, - // "startDate": { - // "description": "Gets Repricing reports on and after this date in the merchant's timezone, up to one year ago. Do not use a start date later than 7 days ago (default). Format is YYYY-MM-DD.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{merchantId}/productstatuses/{productId}/repricingreports", - // "response": { - // "$ref": "ListRepricingProductReportsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - -// 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 *ProductstatusesRepricingreportsListCall) Pages(ctx context.Context, f func(*ListRepricingProductReportsResponse) 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 "content.promotions.create": type PromotionsCreateCall struct { @@ -45785,1051 +44683,6 @@ func (c *ReportsSearchCall) Pages(ctx context.Context, f func(*SearchResponse) e } } -// method id "content.repricingrules.create": - -type RepricingrulesCreateCall struct { - s *APIService - merchantId int64 - repricingrule *RepricingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a repricing rule for your Merchant Center account. -// -// - merchantId: The id of the merchant who owns the repricing rule. -func (r *RepricingrulesService) Create(merchantId int64, repricingrule *RepricingRule) *RepricingrulesCreateCall { - c := &RepricingrulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.repricingrule = repricingrule - return c -} - -// RuleId sets the optional parameter "ruleId": Required. The id of the -// rule to create. -func (c *RepricingrulesCreateCall) RuleId(ruleId string) *RepricingrulesCreateCall { - c.urlParams_.Set("ruleId", ruleId) - 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 *RepricingrulesCreateCall) Fields(s ...googleapi.Field) *RepricingrulesCreateCall { - 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 *RepricingrulesCreateCall) Context(ctx context.Context) *RepricingrulesCreateCall { - 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 *RepricingrulesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RepricingrulesCreateCall) 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.repricingrule) - 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, "{merchantId}/repricingrules") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.repricingrules.create" call. -// Exactly one of *RepricingRule or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RepricingRule.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 *RepricingrulesCreateCall) Do(opts ...googleapi.CallOption) (*RepricingRule, 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 := &RepricingRule{ - 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 repricing rule for your Merchant Center account.", - // "flatPath": "{merchantId}/repricingrules", - // "httpMethod": "POST", - // "id": "content.repricingrules.create", - // "parameterOrder": [ - // "merchantId" - // ], - // "parameters": { - // "merchantId": { - // "description": "Required. The id of the merchant who owns the repricing rule.", - // "format": "int64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ruleId": { - // "description": "Required. The id of the rule to create.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{merchantId}/repricingrules", - // "request": { - // "$ref": "RepricingRule" - // }, - // "response": { - // "$ref": "RepricingRule" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - -// method id "content.repricingrules.delete": - -type RepricingrulesDeleteCall struct { - s *APIService - merchantId int64 - ruleId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a repricing rule in your Merchant Center account. -// -// - merchantId: The id of the merchant who owns the repricing rule. -// - ruleId: The id of the rule to Delete. -func (r *RepricingrulesService) Delete(merchantId int64, ruleId string) *RepricingrulesDeleteCall { - c := &RepricingrulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.ruleId = ruleId - 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 *RepricingrulesDeleteCall) Fields(s ...googleapi.Field) *RepricingrulesDeleteCall { - 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 *RepricingrulesDeleteCall) Context(ctx context.Context) *RepricingrulesDeleteCall { - 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 *RepricingrulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RepricingrulesDeleteCall) 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, "{merchantId}/repricingrules/{ruleId}") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "ruleId": c.ruleId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.repricingrules.delete" call. -func (c *RepricingrulesDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil - // { - // "description": "Deletes a repricing rule in your Merchant Center account.", - // "flatPath": "{merchantId}/repricingrules/{ruleId}", - // "httpMethod": "DELETE", - // "id": "content.repricingrules.delete", - // "parameterOrder": [ - // "merchantId", - // "ruleId" - // ], - // "parameters": { - // "merchantId": { - // "description": "Required. The id of the merchant who owns the repricing rule.", - // "format": "int64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ruleId": { - // "description": "Required. The id of the rule to Delete.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{merchantId}/repricingrules/{ruleId}", - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - -// method id "content.repricingrules.get": - -type RepricingrulesGetCall struct { - s *APIService - merchantId int64 - ruleId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves a repricing rule from your Merchant Center account. -// -// - merchantId: The id of the merchant who owns the repricing rule. -// - ruleId: The id of the rule to retrieve. -func (r *RepricingrulesService) Get(merchantId int64, ruleId string) *RepricingrulesGetCall { - c := &RepricingrulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.ruleId = ruleId - 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 *RepricingrulesGetCall) Fields(s ...googleapi.Field) *RepricingrulesGetCall { - 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 *RepricingrulesGetCall) IfNoneMatch(entityTag string) *RepricingrulesGetCall { - 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 *RepricingrulesGetCall) Context(ctx context.Context) *RepricingrulesGetCall { - 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 *RepricingrulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RepricingrulesGetCall) 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, "{merchantId}/repricingrules/{ruleId}") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "ruleId": c.ruleId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.repricingrules.get" call. -// Exactly one of *RepricingRule or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RepricingRule.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 *RepricingrulesGetCall) Do(opts ...googleapi.CallOption) (*RepricingRule, 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 := &RepricingRule{ - 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": "Retrieves a repricing rule from your Merchant Center account.", - // "flatPath": "{merchantId}/repricingrules/{ruleId}", - // "httpMethod": "GET", - // "id": "content.repricingrules.get", - // "parameterOrder": [ - // "merchantId", - // "ruleId" - // ], - // "parameters": { - // "merchantId": { - // "description": "Required. The id of the merchant who owns the repricing rule.", - // "format": "int64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ruleId": { - // "description": "Required. The id of the rule to retrieve.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{merchantId}/repricingrules/{ruleId}", - // "response": { - // "$ref": "RepricingRule" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - -// method id "content.repricingrules.list": - -type RepricingrulesListCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the repricing rules in your Merchant Center account. -// -// - merchantId: The id of the merchant who owns the repricing rule. -func (r *RepricingrulesService) List(merchantId int64) *RepricingrulesListCall { - c := &RepricingrulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} - -// CountryCode sets the optional parameter "countryCode": CLDR country -// code -// (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) -// (for example, "US"), used as a filter on repricing rules. -func (c *RepricingrulesListCall) CountryCode(countryCode string) *RepricingrulesListCall { - c.urlParams_.Set("countryCode", countryCode) - return c -} - -// LanguageCode sets the optional parameter "languageCode": The -// two-letter ISO 639-1 language code associated with the repricing -// rule, used as a filter. -func (c *RepricingrulesListCall) LanguageCode(languageCode string) *RepricingrulesListCall { - c.urlParams_.Set("languageCode", languageCode) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of repricing rules to return. The service may return fewer than this -// value. If unspecified, at most 50 rules will be returned. The maximum -// value is 1000; values above 1000 will be coerced to 1000. -func (c *RepricingrulesListCall) PageSize(pageSize int64) *RepricingrulesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListRepricingRules` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListRepricingRules` must match the call that provided -// the page token. -func (c *RepricingrulesListCall) PageToken(pageToken string) *RepricingrulesListCall { - 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 *RepricingrulesListCall) Fields(s ...googleapi.Field) *RepricingrulesListCall { - 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 *RepricingrulesListCall) IfNoneMatch(entityTag string) *RepricingrulesListCall { - 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 *RepricingrulesListCall) Context(ctx context.Context) *RepricingrulesListCall { - 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 *RepricingrulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RepricingrulesListCall) 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, "{merchantId}/repricingrules") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.repricingrules.list" call. -// Exactly one of *ListRepricingRulesResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListRepricingRulesResponse.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 *RepricingrulesListCall) Do(opts ...googleapi.CallOption) (*ListRepricingRulesResponse, 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 := &ListRepricingRulesResponse{ - 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 the repricing rules in your Merchant Center account.", - // "flatPath": "{merchantId}/repricingrules", - // "httpMethod": "GET", - // "id": "content.repricingrules.list", - // "parameterOrder": [ - // "merchantId" - // ], - // "parameters": { - // "countryCode": { - // "description": "[CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (for example, \"US\"), used as a filter on repricing rules.", - // "location": "query", - // "type": "string" - // }, - // "languageCode": { - // "description": "The two-letter ISO 639-1 language code associated with the repricing rule, used as a filter.", - // "location": "query", - // "type": "string" - // }, - // "merchantId": { - // "description": "Required. The id of the merchant who owns the repricing rule.", - // "format": "int64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of repricing rules to return. The service may return fewer than this value. If unspecified, at most 50 rules will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListRepricingRules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRepricingRules` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{merchantId}/repricingrules", - // "response": { - // "$ref": "ListRepricingRulesResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - -// 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 *RepricingrulesListCall) Pages(ctx context.Context, f func(*ListRepricingRulesResponse) 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 "content.repricingrules.patch": - -type RepricingrulesPatchCall struct { - s *APIService - merchantId int64 - ruleId string - repricingrule *RepricingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a repricing rule in your Merchant Center account. All -// mutable fields will be overwritten in each update request. In each -// update, you must provide all required mutable fields, or an error -// will be thrown. If you do not provide an optional field in the update -// request, if that field currently exists, it will be deleted from the -// rule. -// -// - merchantId: The id of the merchant who owns the repricing rule. -// - ruleId: The id of the rule to update. -func (r *RepricingrulesService) Patch(merchantId int64, ruleId string, repricingrule *RepricingRule) *RepricingrulesPatchCall { - c := &RepricingrulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.ruleId = ruleId - c.repricingrule = repricingrule - 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 *RepricingrulesPatchCall) Fields(s ...googleapi.Field) *RepricingrulesPatchCall { - 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 *RepricingrulesPatchCall) Context(ctx context.Context) *RepricingrulesPatchCall { - 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 *RepricingrulesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RepricingrulesPatchCall) 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.repricingrule) - 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, "{merchantId}/repricingrules/{ruleId}") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "ruleId": c.ruleId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.repricingrules.patch" call. -// Exactly one of *RepricingRule or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *RepricingRule.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 *RepricingrulesPatchCall) Do(opts ...googleapi.CallOption) (*RepricingRule, 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 := &RepricingRule{ - 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 repricing rule in your Merchant Center account. All mutable fields will be overwritten in each update request. In each update, you must provide all required mutable fields, or an error will be thrown. If you do not provide an optional field in the update request, if that field currently exists, it will be deleted from the rule.", - // "flatPath": "{merchantId}/repricingrules/{ruleId}", - // "httpMethod": "PATCH", - // "id": "content.repricingrules.patch", - // "parameterOrder": [ - // "merchantId", - // "ruleId" - // ], - // "parameters": { - // "merchantId": { - // "description": "Required. The id of the merchant who owns the repricing rule.", - // "format": "int64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "ruleId": { - // "description": "Required. The id of the rule to update.", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{merchantId}/repricingrules/{ruleId}", - // "request": { - // "$ref": "RepricingRule" - // }, - // "response": { - // "$ref": "RepricingRule" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - -// method id "content.repricingrules.repricingreports.list": - -type RepricingrulesRepricingreportsListCall struct { - s *APIService - merchantId int64 - ruleId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: *Deprecated*: New merchants can't start using this service. -// Lists the metrics report for a given Repricing rule. -// -// - merchantId: Id of the merchant who owns the Repricing rule. -// - ruleId: Id of the Repricing rule. -func (r *RepricingrulesRepricingreportsService) List(merchantId int64, ruleId string) *RepricingrulesRepricingreportsListCall { - c := &RepricingrulesRepricingreportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.ruleId = ruleId - return c -} - -// EndDate sets the optional parameter "endDate": Gets Repricing reports -// on and before this date in the merchant's timezone. You can only -// retrieve data up to 7 days ago (default) or earlier. Format: -// YYYY-MM-DD. -func (c *RepricingrulesRepricingreportsListCall) EndDate(endDate string) *RepricingrulesRepricingreportsListCall { - c.urlParams_.Set("endDate", endDate) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// daily reports to return. Each report includes data from a single -// 24-hour period. The page size defaults to 50 and values above 1000 -// are coerced to 1000. This service may return fewer days than this -// value, for example, if the time between your start and end date is -// less than page size. -func (c *RepricingrulesRepricingreportsListCall) PageSize(pageSize int64) *RepricingrulesRepricingreportsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Token (if -// provided) to retrieve the subsequent page. All other parameters must -// match the original call that provided the page token. -func (c *RepricingrulesRepricingreportsListCall) PageToken(pageToken string) *RepricingrulesRepricingreportsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// StartDate sets the optional parameter "startDate": Gets Repricing -// reports on and after this date in the merchant's timezone, up to one -// year ago. Do not use a start date later than 7 days ago (default). -// Format: YYYY-MM-DD. -func (c *RepricingrulesRepricingreportsListCall) StartDate(startDate string) *RepricingrulesRepricingreportsListCall { - c.urlParams_.Set("startDate", startDate) - 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 *RepricingrulesRepricingreportsListCall) Fields(s ...googleapi.Field) *RepricingrulesRepricingreportsListCall { - 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 *RepricingrulesRepricingreportsListCall) IfNoneMatch(entityTag string) *RepricingrulesRepricingreportsListCall { - 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 *RepricingrulesRepricingreportsListCall) Context(ctx context.Context) *RepricingrulesRepricingreportsListCall { - 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 *RepricingrulesRepricingreportsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RepricingrulesRepricingreportsListCall) 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, "{merchantId}/repricingrules/{ruleId}/repricingreports") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "ruleId": c.ruleId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.repricingrules.repricingreports.list" call. -// Exactly one of *ListRepricingRuleReportsResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListRepricingRuleReportsResponse.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 *RepricingrulesRepricingreportsListCall) Do(opts ...googleapi.CallOption) (*ListRepricingRuleReportsResponse, 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 := &ListRepricingRuleReportsResponse{ - 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": "*Deprecated*: New merchants can't start using this service. Lists the metrics report for a given Repricing rule.", - // "flatPath": "{merchantId}/repricingrules/{ruleId}/repricingreports", - // "httpMethod": "GET", - // "id": "content.repricingrules.repricingreports.list", - // "parameterOrder": [ - // "merchantId", - // "ruleId" - // ], - // "parameters": { - // "endDate": { - // "description": "Gets Repricing reports on and before this date in the merchant's timezone. You can only retrieve data up to 7 days ago (default) or earlier. Format: YYYY-MM-DD.", - // "location": "query", - // "type": "string" - // }, - // "merchantId": { - // "description": "Required. Id of the merchant who owns the Repricing rule.", - // "format": "int64", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of daily reports to return. Each report includes data from a single 24-hour period. The page size defaults to 50 and values above 1000 are coerced to 1000. This service may return fewer days than this value, for example, if the time between your start and end date is less than page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "ruleId": { - // "description": "Required. Id of the Repricing rule.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "startDate": { - // "description": "Gets Repricing reports on and after this date in the merchant's timezone, up to one year ago. Do not use a start date later than 7 days ago (default). Format: YYYY-MM-DD.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "{merchantId}/repricingrules/{ruleId}/repricingreports", - // "response": { - // "$ref": "ListRepricingRuleReportsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - -// 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 *RepricingrulesRepricingreportsListCall) Pages(ctx context.Context, f func(*ListRepricingRuleReportsResponse) 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 "content.returnaddress.custombatch": type ReturnaddressCustombatchCall struct { diff --git a/datafusion/v1/datafusion-api.json b/datafusion/v1/datafusion-api.json index 3443de731de..b9b0ee5eb62 100644 --- a/datafusion/v1/datafusion-api.json +++ b/datafusion/v1/datafusion-api.json @@ -737,7 +737,7 @@ } } }, - "revision": "20231017", + "revision": "20231130", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -868,6 +868,38 @@ }, "type": "object" }, + "DataResidencyAugmentedView": { + "description": "Next tag: 7", + "id": "DataResidencyAugmentedView", + "properties": { + "crGopoGuris": { + "description": "Cloud resource to Google owned production object mapping in the form of GURIs. The GURIs should be available in DG KB storage/cns tables. This is the preferred way of providing cloud resource mappings. For further details please read go/cloud-resource-monitoring_sig", + "items": { + "type": "string" + }, + "type": "array" + }, + "crGopoPrefixes": { + "description": "Cloud resource to Google owned production object mapping in the form of prefixes. These should be available in DG KB storage/cns tables. The entity type, which is the part of the string before the first colon in the GURI, must be completely specified in prefix. For details about GURI please read go/guri. For further details about the field please read go/cloud-resource-monitoring_sig.", + "items": { + "type": "string" + }, + "type": "array" + }, + "serviceData": { + "$ref": "ServiceData", + "description": "Service-specific data. Only required for pre-determined services. Generally used to bind a Cloud Resource to some a TI container that uniquely specifies a customer. See milestone 2 of DRZ KR8 SIG for more information." + }, + "tpIds": { + "description": "The list of project_id's of the tenant projects in the 'google.com' org which serve the Cloud Resource. See go/drz-mst-sig for more details.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "DnsPeering": { "description": "DNS peering configuration. These configurations are used to create DNS peering with the customer Cloud DNS.", "id": "DnsPeering", @@ -974,6 +1006,10 @@ "$ref": "CryptoKeyConfig", "description": "The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature." }, + "dataplexDataLineageIntegrationEnabled": { + "description": "Optional. Reserved for future use.", + "type": "boolean" + }, "dataprocServiceAccount": { "description": "User-managed service account to set on Dataproc when Cloud Data Fusion creates Dataproc to run data processing pipelines. This allows users to have fine-grained access control on Dataproc's accesses to cloud resources.", "type": "string" @@ -1293,13 +1329,31 @@ "description": "Network configuration for a Data Fusion instance. These configurations are used for peering with the customer network. Configurations are optional when a public Data Fusion instance is to be created. However, providing these configurations allows several benefits, such as reduced network latency while accessing the customer resources from managed Data Fusion instance nodes, as well as access to the customer on-prem resources.", "id": "NetworkConfig", "properties": { + "connectionType": { + "description": "Optional. Type of connection for establishing private IP connectivity between the Data Fusion customer project VPC and the corresponding tenant project from a predefined list of available connection modes. If this field is unspecified for a private instance, VPC peering is used.", + "enum": [ + "CONNECTION_TYPE_UNSPECIFIED", + "VPC_PEERING", + "PRIVATE_SERVICE_CONNECT_INTERFACES" + ], + "enumDescriptions": [ + "No specific connection type was requested, the default value of VPC_PEERING is chosen.", + "Requests the use of VPC peerings for connecting the consumer and tenant projects.", + "Requests the use of Private Service Connect Interfaces for connecting the consumer and tenant projects." + ], + "type": "string" + }, "ipAllocation": { - "description": "The IP range in CIDR notation to use for the managed Data Fusion instance nodes. This range must not overlap with any other ranges used in the customer network.", + "description": "Optional. The IP range in CIDR notation to use for the managed Data Fusion instance nodes. This range must not overlap with any other ranges used in the Data Fusion instance network. This is required only when using connection type VPC_PEERING. Format: a.b.c.d/22 Example: 192.168.0.0/22", "type": "string" }, "network": { - "description": "Name of the network in the customer project with which the Tenant Project will be peered for executing pipelines. In case of shared VPC where the network resides in another host project the network should specified in the form of projects/{host-project-id}/global/networks/{network}", + "description": "Optional. Name of the network in the customer project with which the Tenant Project will be peered for executing pipelines. This is required only when using connection type VPC peering. In case of shared VPC where the network resides in another host project the network should specified in the form of projects/{host-project-id}/global/networks/{network}. This is only required for connectivity type VPC_PEERING.", "type": "string" + }, + "privateServiceConnectConfig": { + "$ref": "PrivateServiceConnectConfig", + "description": "Optional. Configuration for Private Service Connect. This is required only when using connection type PRIVATE_SERVICE_CONNECT_INTERFACES." } }, "type": "object" @@ -1383,6 +1437,27 @@ }, "type": "object" }, + "PersistentDiskData": { + "description": "Persistent Disk service-specific Data. Contains information that may not be appropriate for the generic DRZ Augmented View. This currently includes LSV Colossus Roots and GCS Buckets.", + "id": "PersistentDiskData", + "properties": { + "cfsRoots": { + "description": "Path to Colossus root for an LSV. NOTE: Unlike `cr_ti_guris` and `cr_ti_prefixes`, the field `cfs_roots` below does not need to be a GUri or GUri prefix. It can simply be any valid CFS or CFS2 Path. The DRZ KR8 SIG has more details overall, but generally the `cfs_roots` provided here should be scoped to an individual Persistent Disk. An example for a PD Disk with a disk ID 3277719120423414466, follows: * `cr_ti_guris` could be ‘/cfs2/pj/pd-cloud-prod’ as this is a valid GUri present in the DG KB and contains enough information to perform location monitoring and scope ownership of the Production Object. * `cfs_roots` would be: ‘/cfs2/pj/pd-cloud-staging/lsv000001234@/ lsv/projects~773365403387~zones~2700~disks~3277719120423414466 ~bank-blue-careful-3526-lsv00054DB1B7254BA3/’ as this allows us to enumerate the files on CFS2 that belong to an individual Disk.", + "items": { + "type": "string" + }, + "type": "array" + }, + "gcsBucketNames": { + "description": "The GCS Buckets that back this snapshot or image. This is required as `cr_ti_prefixes` and `cr_ti_guris` only accept TI resources. This should be the globally unique bucket name.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -1414,12 +1489,43 @@ }, "type": "object" }, + "PrivateServiceConnectConfig": { + "description": "Configuration for using Private Service Connect to establish connectivity between the Data Fusion consumer project and the corresponding tenant project.", + "id": "PrivateServiceConnectConfig", + "properties": { + "effectiveUnreachableCidrBlock": { + "description": "Output only. The CIDR block to which the CDF instance can't route traffic to in the consumer project VPC. The size of this block is /25. The format of this field is governed by RFC 4632. Example: 240.0.0.0/25", + "readOnly": true, + "type": "string" + }, + "networkAttachment": { + "description": "Required. The reference to the network attachment used to establish private connectivity. It will be of the form projects/{project-id}/regions/{region}/networkAttachments/{network-attachment-id}.", + "type": "string" + }, + "unreachableCidrBlock": { + "description": "Optional. Input only. The CIDR block to which the CDF instance can't route traffic to in the consumer project VPC. The size of this block should be at least /25. This range should not overlap with the primary address range of any subnetwork used by the network attachment. This range can be used for other purposes in the consumer VPC as long as there is no requirement for CDF to reach destinations using these addresses. If this value is not provided, the server chooses a non RFC 1918 address range. The format of this field is governed by RFC 4632. Example: 192.168.0.0/25", + "type": "string" + } + }, + "type": "object" + }, "RestartInstanceRequest": { "description": "Request message for restarting a Data Fusion instance.", "id": "RestartInstanceRequest", "properties": {}, "type": "object" }, + "ServiceData": { + "description": "This message defines service-specific data that certain service teams must provide as part of the Data Residency Augmented View for a resource. Next ID: 2", + "id": "ServiceData", + "properties": { + "pd": { + "$ref": "PersistentDiskData", + "description": "Auxiliary data for the persistent disk pipeline provided to provide the LSV Colossus Roots and GCS Buckets." + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", diff --git a/datafusion/v1/datafusion-gen.go b/datafusion/v1/datafusion-gen.go index 07c6fee7cc1..a2581e2acd0 100644 --- a/datafusion/v1/datafusion-gen.go +++ b/datafusion/v1/datafusion-gen.go @@ -485,6 +485,57 @@ func (s *CryptoKeyConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DataResidencyAugmentedView: Next tag: 7 +type DataResidencyAugmentedView struct { + // CrGopoGuris: Cloud resource to Google owned production object mapping + // in the form of GURIs. The GURIs should be available in DG KB + // storage/cns tables. This is the preferred way of providing cloud + // resource mappings. For further details please read + // go/cloud-resource-monitoring_sig + CrGopoGuris []string `json:"crGopoGuris,omitempty"` + + // CrGopoPrefixes: Cloud resource to Google owned production object + // mapping in the form of prefixes. These should be available in DG KB + // storage/cns tables. The entity type, which is the part of the string + // before the first colon in the GURI, must be completely specified in + // prefix. For details about GURI please read go/guri. For further + // details about the field please read go/cloud-resource-monitoring_sig. + CrGopoPrefixes []string `json:"crGopoPrefixes,omitempty"` + + // ServiceData: Service-specific data. Only required for pre-determined + // services. Generally used to bind a Cloud Resource to some a TI + // container that uniquely specifies a customer. See milestone 2 of DRZ + // KR8 SIG for more information. + ServiceData *ServiceData `json:"serviceData,omitempty"` + + // TpIds: The list of project_id's of the tenant projects in the + // 'google.com' org which serve the Cloud Resource. See go/drz-mst-sig + // for more details. + TpIds []string `json:"tpIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CrGopoGuris") 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. "CrGopoGuris") 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 *DataResidencyAugmentedView) MarshalJSON() ([]byte, error) { + type NoMethod DataResidencyAugmentedView + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DnsPeering: DNS peering configuration. These configurations are used // to create DNS peering with the customer Cloud DNS. type DnsPeering struct { @@ -658,6 +709,10 @@ type Instance struct { // the Customer-Managed Encryption Keys (CMEK) feature. CryptoKeyConfig *CryptoKeyConfig `json:"cryptoKeyConfig,omitempty"` + // DataplexDataLineageIntegrationEnabled: Optional. Reserved for future + // use. + DataplexDataLineageIntegrationEnabled bool `json:"dataplexDataLineageIntegrationEnabled,omitempty"` + // DataprocServiceAccount: User-managed service account to set on // Dataproc when Cloud Data Fusion creates Dataproc to run data // processing pipelines. This allows users to have fine-grained access @@ -1071,19 +1126,44 @@ func (s *Location) MarshalJSON() ([]byte, error) { // customer resources from managed Data Fusion instance nodes, as well // as access to the customer on-prem resources. type NetworkConfig struct { - // IpAllocation: The IP range in CIDR notation to use for the managed - // Data Fusion instance nodes. This range must not overlap with any - // other ranges used in the customer network. + // ConnectionType: Optional. Type of connection for establishing private + // IP connectivity between the Data Fusion customer project VPC and the + // corresponding tenant project from a predefined list of available + // connection modes. If this field is unspecified for a private + // instance, VPC peering is used. + // + // Possible values: + // "CONNECTION_TYPE_UNSPECIFIED" - No specific connection type was + // requested, the default value of VPC_PEERING is chosen. + // "VPC_PEERING" - Requests the use of VPC peerings for connecting the + // consumer and tenant projects. + // "PRIVATE_SERVICE_CONNECT_INTERFACES" - Requests the use of Private + // Service Connect Interfaces for connecting the consumer and tenant + // projects. + ConnectionType string `json:"connectionType,omitempty"` + + // IpAllocation: Optional. The IP range in CIDR notation to use for the + // managed Data Fusion instance nodes. This range must not overlap with + // any other ranges used in the Data Fusion instance network. This is + // required only when using connection type VPC_PEERING. Format: + // a.b.c.d/22 Example: 192.168.0.0/22 IpAllocation string `json:"ipAllocation,omitempty"` - // Network: Name of the network in the customer project with which the - // Tenant Project will be peered for executing pipelines. In case of + // Network: Optional. Name of the network in the customer project with + // which the Tenant Project will be peered for executing pipelines. This + // is required only when using connection type VPC peering. In case of // shared VPC where the network resides in another host project the // network should specified in the form of - // projects/{host-project-id}/global/networks/{network} + // projects/{host-project-id}/global/networks/{network}. This is only + // required for connectivity type VPC_PEERING. Network string `json:"network,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAllocation") to + // PrivateServiceConnectConfig: Optional. Configuration for Private + // Service Connect. This is required only when using connection type + // PRIVATE_SERVICE_CONNECT_INTERFACES. + PrivateServiceConnectConfig *PrivateServiceConnectConfig `json:"privateServiceConnectConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConnectionType") 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 @@ -1091,12 +1171,13 @@ type NetworkConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAllocation") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ConnectionType") 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:"-"` } @@ -1225,6 +1306,54 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PersistentDiskData: Persistent Disk service-specific Data. Contains +// information that may not be appropriate for the generic DRZ Augmented +// View. This currently includes LSV Colossus Roots and GCS Buckets. +type PersistentDiskData struct { + // CfsRoots: Path to Colossus root for an LSV. NOTE: Unlike + // `cr_ti_guris` and `cr_ti_prefixes`, the field `cfs_roots` below does + // not need to be a GUri or GUri prefix. It can simply be any valid CFS + // or CFS2 Path. The DRZ KR8 SIG has more details overall, but generally + // the `cfs_roots` provided here should be scoped to an individual + // Persistent Disk. An example for a PD Disk with a disk ID + // 3277719120423414466, follows: * `cr_ti_guris` could be + // ‘/cfs2/pj/pd-cloud-prod’ as this is a valid GUri present in the + // DG KB and contains enough information to perform location monitoring + // and scope ownership of the Production Object. * `cfs_roots` would be: + // ‘/cfs2/pj/pd-cloud-staging/lsv000001234@/ + // lsv/projects~773365403387~zones~2700~disks~3277719120423414466 + // ~bank-blue-careful-3526-lsv00054DB1B7254BA3/’ as this allows us to + // enumerate the files on CFS2 that belong to an individual Disk. + CfsRoots []string `json:"cfsRoots,omitempty"` + + // GcsBucketNames: The GCS Buckets that back this snapshot or image. + // This is required as `cr_ti_prefixes` and `cr_ti_guris` only accept TI + // resources. This should be the globally unique bucket name. + GcsBucketNames []string `json:"gcsBucketNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CfsRoots") 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. "CfsRoots") 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 *PersistentDiskData) MarshalJSON() ([]byte, error) { + type NoMethod PersistentDiskData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Policy: An Identity and Access Management (IAM) policy, which // specifies access controls for Google Cloud resources. A `Policy` is a // collection of `bindings`. A `binding` binds one or more `members`, or @@ -1335,11 +1464,94 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PrivateServiceConnectConfig: Configuration for using Private Service +// Connect to establish connectivity between the Data Fusion consumer +// project and the corresponding tenant project. +type PrivateServiceConnectConfig struct { + // EffectiveUnreachableCidrBlock: Output only. The CIDR block to which + // the CDF instance can't route traffic to in the consumer project VPC. + // The size of this block is /25. The format of this field is governed + // by RFC 4632. Example: 240.0.0.0/25 + EffectiveUnreachableCidrBlock string `json:"effectiveUnreachableCidrBlock,omitempty"` + + // NetworkAttachment: Required. The reference to the network attachment + // used to establish private connectivity. It will be of the form + // projects/{project-id}/regions/{region}/networkAttachments/{network-att + // achment-id}. + NetworkAttachment string `json:"networkAttachment,omitempty"` + + // UnreachableCidrBlock: Optional. Input only. The CIDR block to which + // the CDF instance can't route traffic to in the consumer project VPC. + // The size of this block should be at least /25. This range should not + // overlap with the primary address range of any subnetwork used by the + // network attachment. This range can be used for other purposes in the + // consumer VPC as long as there is no requirement for CDF to reach + // destinations using these addresses. If this value is not provided, + // the server chooses a non RFC 1918 address range. The format of this + // field is governed by RFC 4632. Example: 192.168.0.0/25 + UnreachableCidrBlock string `json:"unreachableCidrBlock,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EffectiveUnreachableCidrBlock") 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. + // "EffectiveUnreachableCidrBlock") 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 *PrivateServiceConnectConfig) MarshalJSON() ([]byte, error) { + type NoMethod PrivateServiceConnectConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RestartInstanceRequest: Request message for restarting a Data Fusion // instance. type RestartInstanceRequest struct { } +// ServiceData: This message defines service-specific data that certain +// service teams must provide as part of the Data Residency Augmented +// View for a resource. Next ID: 2 +type ServiceData struct { + // Pd: Auxiliary data for the persistent disk pipeline provided to + // provide the LSV Colossus Roots and GCS Buckets. + Pd *PersistentDiskData `json:"pd,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Pd") 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. "Pd") 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 *ServiceData) MarshalJSON() ([]byte, error) { + type NoMethod ServiceData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the diff --git a/datafusion/v1beta1/datafusion-api.json b/datafusion/v1beta1/datafusion-api.json index a8e843371aa..4dae82deef3 100644 --- a/datafusion/v1beta1/datafusion-api.json +++ b/datafusion/v1beta1/datafusion-api.json @@ -935,7 +935,7 @@ } } }, - "revision": "20231017", + "revision": "20231130", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -1066,6 +1066,38 @@ }, "type": "object" }, + "DataResidencyAugmentedView": { + "description": "Next tag: 7", + "id": "DataResidencyAugmentedView", + "properties": { + "crGopoGuris": { + "description": "Cloud resource to Google owned production object mapping in the form of GURIs. The GURIs should be available in DG KB storage/cns tables. This is the preferred way of providing cloud resource mappings. For further details please read go/cloud-resource-monitoring_sig", + "items": { + "type": "string" + }, + "type": "array" + }, + "crGopoPrefixes": { + "description": "Cloud resource to Google owned production object mapping in the form of prefixes. These should be available in DG KB storage/cns tables. The entity type, which is the part of the string before the first colon in the GURI, must be completely specified in prefix. For details about GURI please read go/guri. For further details about the field please read go/cloud-resource-monitoring_sig.", + "items": { + "type": "string" + }, + "type": "array" + }, + "serviceData": { + "$ref": "ServiceData", + "description": "Service-specific data. Only required for pre-determined services. Generally used to bind a Cloud Resource to some a TI container that uniquely specifies a customer. See milestone 2 of DRZ KR8 SIG for more information." + }, + "tpIds": { + "description": "The list of project_id's of the tenant projects in the 'google.com' org which serve the Cloud Resource. See go/drz-mst-sig for more details.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "DnsPeering": { "description": "DNS peering configuration. These configurations are used to create DNS peering with the customer Cloud DNS.", "id": "DnsPeering", @@ -1187,6 +1219,10 @@ "$ref": "CryptoKeyConfig", "description": "The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature." }, + "dataplexDataLineageIntegrationEnabled": { + "description": "Optional. Reserved for future use.", + "type": "boolean" + }, "dataprocServiceAccount": { "description": "User-managed service account to set on Dataproc when Cloud Data Fusion creates Dataproc to run data processing pipelines. This allows users to have fine-grained access control on Dataproc's accesses to cloud resources.", "type": "string" @@ -1558,7 +1594,7 @@ "type": "string" }, "network": { - "description": "Optional. Name of the network in the customer project with which the Tenant Project will be peered for executing pipelines. This is required only when using connection type VPC peering. In case of shared VPC where the network resides in another host project the network should specified in the form of projects/{project-id}/global/networks/{network}. This is only required for connectivity type VPC_PEERING.", + "description": "Optional. Name of the network in the customer project with which the Tenant Project will be peered for executing pipelines. This is required only when using connection type VPC peering. In case of shared VPC where the network resides in another host project the network should specified in the form of projects/{host-project-id}/global/networks/{network}. This is only required for connectivity type VPC_PEERING.", "type": "string" }, "privateServiceConnectConfig": { @@ -1647,6 +1683,27 @@ }, "type": "object" }, + "PersistentDiskData": { + "description": "Persistent Disk service-specific Data. Contains information that may not be appropriate for the generic DRZ Augmented View. This currently includes LSV Colossus Roots and GCS Buckets.", + "id": "PersistentDiskData", + "properties": { + "cfsRoots": { + "description": "Path to Colossus root for an LSV. NOTE: Unlike `cr_ti_guris` and `cr_ti_prefixes`, the field `cfs_roots` below does not need to be a GUri or GUri prefix. It can simply be any valid CFS or CFS2 Path. The DRZ KR8 SIG has more details overall, but generally the `cfs_roots` provided here should be scoped to an individual Persistent Disk. An example for a PD Disk with a disk ID 3277719120423414466, follows: * `cr_ti_guris` could be ‘/cfs2/pj/pd-cloud-prod’ as this is a valid GUri present in the DG KB and contains enough information to perform location monitoring and scope ownership of the Production Object. * `cfs_roots` would be: ‘/cfs2/pj/pd-cloud-staging/lsv000001234@/ lsv/projects~773365403387~zones~2700~disks~3277719120423414466 ~bank-blue-careful-3526-lsv00054DB1B7254BA3/’ as this allows us to enumerate the files on CFS2 that belong to an individual Disk.", + "items": { + "type": "string" + }, + "type": "array" + }, + "gcsBucketNames": { + "description": "The GCS Buckets that back this snapshot or image. This is required as `cr_ti_prefixes` and `cr_ti_guris` only accept TI resources. This should be the globally unique bucket name.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -1716,6 +1773,17 @@ "properties": {}, "type": "object" }, + "ServiceData": { + "description": "This message defines service-specific data that certain service teams must provide as part of the Data Residency Augmented View for a resource. Next ID: 2", + "id": "ServiceData", + "properties": { + "pd": { + "$ref": "PersistentDiskData", + "description": "Auxiliary data for the persistent disk pipeline provided to provide the LSV Colossus Roots and GCS Buckets." + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", diff --git a/datafusion/v1beta1/datafusion-gen.go b/datafusion/v1beta1/datafusion-gen.go index 4ee7e60a55a..619d4a86b65 100644 --- a/datafusion/v1beta1/datafusion-gen.go +++ b/datafusion/v1beta1/datafusion-gen.go @@ -497,6 +497,57 @@ func (s *CryptoKeyConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DataResidencyAugmentedView: Next tag: 7 +type DataResidencyAugmentedView struct { + // CrGopoGuris: Cloud resource to Google owned production object mapping + // in the form of GURIs. The GURIs should be available in DG KB + // storage/cns tables. This is the preferred way of providing cloud + // resource mappings. For further details please read + // go/cloud-resource-monitoring_sig + CrGopoGuris []string `json:"crGopoGuris,omitempty"` + + // CrGopoPrefixes: Cloud resource to Google owned production object + // mapping in the form of prefixes. These should be available in DG KB + // storage/cns tables. The entity type, which is the part of the string + // before the first colon in the GURI, must be completely specified in + // prefix. For details about GURI please read go/guri. For further + // details about the field please read go/cloud-resource-monitoring_sig. + CrGopoPrefixes []string `json:"crGopoPrefixes,omitempty"` + + // ServiceData: Service-specific data. Only required for pre-determined + // services. Generally used to bind a Cloud Resource to some a TI + // container that uniquely specifies a customer. See milestone 2 of DRZ + // KR8 SIG for more information. + ServiceData *ServiceData `json:"serviceData,omitempty"` + + // TpIds: The list of project_id's of the tenant projects in the + // 'google.com' org which serve the Cloud Resource. See go/drz-mst-sig + // for more details. + TpIds []string `json:"tpIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CrGopoGuris") 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. "CrGopoGuris") 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 *DataResidencyAugmentedView) MarshalJSON() ([]byte, error) { + type NoMethod DataResidencyAugmentedView + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DnsPeering: DNS peering configuration. These configurations are used // to create DNS peering with the customer Cloud DNS. type DnsPeering struct { @@ -703,6 +754,10 @@ type Instance struct { // the Customer-Managed Encryption Keys (CMEK) feature. CryptoKeyConfig *CryptoKeyConfig `json:"cryptoKeyConfig,omitempty"` + // DataplexDataLineageIntegrationEnabled: Optional. Reserved for future + // use. + DataplexDataLineageIntegrationEnabled bool `json:"dataplexDataLineageIntegrationEnabled,omitempty"` + // DataprocServiceAccount: User-managed service account to set on // Dataproc when Cloud Data Fusion creates Dataproc to run data // processing pipelines. This allows users to have fine-grained access @@ -1209,7 +1264,7 @@ type NetworkConfig struct { // is required only when using connection type VPC peering. In case of // shared VPC where the network resides in another host project the // network should specified in the form of - // projects/{project-id}/global/networks/{network}. This is only + // projects/{host-project-id}/global/networks/{network}. This is only // required for connectivity type VPC_PEERING. Network string `json:"network,omitempty"` @@ -1361,6 +1416,54 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PersistentDiskData: Persistent Disk service-specific Data. Contains +// information that may not be appropriate for the generic DRZ Augmented +// View. This currently includes LSV Colossus Roots and GCS Buckets. +type PersistentDiskData struct { + // CfsRoots: Path to Colossus root for an LSV. NOTE: Unlike + // `cr_ti_guris` and `cr_ti_prefixes`, the field `cfs_roots` below does + // not need to be a GUri or GUri prefix. It can simply be any valid CFS + // or CFS2 Path. The DRZ KR8 SIG has more details overall, but generally + // the `cfs_roots` provided here should be scoped to an individual + // Persistent Disk. An example for a PD Disk with a disk ID + // 3277719120423414466, follows: * `cr_ti_guris` could be + // ‘/cfs2/pj/pd-cloud-prod’ as this is a valid GUri present in the + // DG KB and contains enough information to perform location monitoring + // and scope ownership of the Production Object. * `cfs_roots` would be: + // ‘/cfs2/pj/pd-cloud-staging/lsv000001234@/ + // lsv/projects~773365403387~zones~2700~disks~3277719120423414466 + // ~bank-blue-careful-3526-lsv00054DB1B7254BA3/’ as this allows us to + // enumerate the files on CFS2 that belong to an individual Disk. + CfsRoots []string `json:"cfsRoots,omitempty"` + + // GcsBucketNames: The GCS Buckets that back this snapshot or image. + // This is required as `cr_ti_prefixes` and `cr_ti_guris` only accept TI + // resources. This should be the globally unique bucket name. + GcsBucketNames []string `json:"gcsBucketNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CfsRoots") 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. "CfsRoots") 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 *PersistentDiskData) MarshalJSON() ([]byte, error) { + type NoMethod PersistentDiskData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Policy: An Identity and Access Management (IAM) policy, which // specifies access controls for Google Cloud resources. A `Policy` is a // collection of `bindings`. A `binding` binds one or more `members`, or @@ -1539,6 +1642,37 @@ type RemoveIamPolicyResponse struct { type RestartInstanceRequest struct { } +// ServiceData: This message defines service-specific data that certain +// service teams must provide as part of the Data Residency Augmented +// View for a resource. Next ID: 2 +type ServiceData struct { + // Pd: Auxiliary data for the persistent disk pipeline provided to + // provide the LSV Colossus Roots and GCS Buckets. + Pd *PersistentDiskData `json:"pd,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Pd") 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. "Pd") 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 *ServiceData) MarshalJSON() ([]byte, error) { + type NoMethod ServiceData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json index bb3a695f7af..d0fecd0c832 100644 --- a/monitoring/v3/monitoring-api.json +++ b/monitoring/v3/monitoring-api.json @@ -2714,7 +2714,7 @@ } } }, - "revision": "20231115", + "revision": "20231201", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -2881,7 +2881,7 @@ "type": "array" }, "severity": { - "description": "Optional. The severity of an alert policy indicates how important alerts generated by that policy are. The severity level, if specified, will be displayed on the Incident detail page and in notifications.", + "description": "Optional. The severity of an alert policy indicates how important incidents generated by that policy are. The severity level will be displayed on the Incident detail page and in notifications.", "enum": [ "SEVERITY_UNSPECIFIED", "CRITICAL", diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go index e3562dc9391..538ec3f95ed 100644 --- a/monitoring/v3/monitoring-gen.go +++ b/monitoring/v3/monitoring-gen.go @@ -763,9 +763,8 @@ type AlertPolicy struct { NotificationChannels []string `json:"notificationChannels,omitempty"` // Severity: Optional. The severity of an alert policy indicates how - // important alerts generated by that policy are. The severity level, if - // specified, will be displayed on the Incident detail page and in - // notifications. + // important incidents generated by that policy are. The severity level + // will be displayed on the Incident detail page and in notifications. // // Possible values: // "SEVERITY_UNSPECIFIED" - No severity is specified. This is the diff --git a/orgpolicy/v2/orgpolicy-api.json b/orgpolicy/v2/orgpolicy-api.json index ced72f8fa16..40b076770a0 100644 --- a/orgpolicy/v2/orgpolicy-api.json +++ b/orgpolicy/v2/orgpolicy-api.json @@ -915,7 +915,7 @@ } } }, - "revision": "20230806", + "revision": "20231203", "rootUrl": "https://orgpolicy.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1151,7 +1151,7 @@ "id": "GoogleCloudOrgpolicyV2PolicySpec", "properties": { "etag": { - "description": "An opaque tag indicating the current version of the policy, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy` is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policy to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", + "description": "An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", "type": "string" }, "inheritFromParent": { diff --git a/orgpolicy/v2/orgpolicy-gen.go b/orgpolicy/v2/orgpolicy-gen.go index 6cdaed20f40..1f0f052279b 100644 --- a/orgpolicy/v2/orgpolicy-gen.go +++ b/orgpolicy/v2/orgpolicy-gen.go @@ -691,11 +691,11 @@ func (s *GoogleCloudOrgpolicyV2Policy) MarshalJSON() ([]byte, error) { // specification which is used to specify constraints for configurations // of Google Cloud resources. type GoogleCloudOrgpolicyV2PolicySpec struct { - // Etag: An opaque tag indicating the current version of the policy, + // Etag: An opaque tag indicating the current version of the policySpec, // used for concurrency control. This field is ignored if used in a - // `CreatePolicy` request. When the policy` is returned from either a + // `CreatePolicy` request. When the policy is returned from either a // `GetPolicy` or a `ListPolicies` request, this `etag` indicates the - // version of the current policy to use when executing a + // version of the current policySpec to use when executing a // read-modify-write loop. When the policy is returned from a // `GetEffectivePolicy` request, the `etag` will be unset. Etag string `json:"etag,omitempty"` diff --git a/places/v1/places-api.json b/places/v1/places-api.json index 633568ac010..dd27897d57b 100644 --- a/places/v1/places-api.json +++ b/places/v1/places-api.json @@ -248,7 +248,7 @@ } } }, - "revision": "20231119", + "revision": "20231203", "rootUrl": "https://places.googleapis.com/", "schemas": { "GoogleGeoTypeViewport": { @@ -1305,7 +1305,7 @@ }, "rectangle": { "$ref": "GoogleGeoTypeViewport", - "description": "A rectangle box defined by northeast and southwest corner. `rectangle.high()` must be the northeast point of the rectangle viewport. `rectangle.low()` must be the southwest point of the rectangle viewport." + "description": "A rectangle box defined by northeast and southwest corner. `rectangle.high()` must be the northeast point of the rectangle viewport. `rectangle.low()` must be the southwest point of the rectangle viewport. `rectangle.low().latitude()` cannot be greater than `rectangle.high().latitude()`. This will result in an empty latitude range. A rectangle viewport cannot be wider than 180 degrees." } }, "type": "object" @@ -1316,7 +1316,7 @@ "properties": { "rectangle": { "$ref": "GoogleGeoTypeViewport", - "description": "A rectangle box defined by northeast and southwest corner. `rectangle.high()` must be the northeast point of the rectangle viewport. `rectangle.low()` must be the southwest point of the rectangle viewport." + "description": "A rectangle box defined by northeast and southwest corner. `rectangle.high()` must be the northeast point of the rectangle viewport. `rectangle.low()` must be the southwest point of the rectangle viewport. `rectangle.low().latitude()` cannot be greater than `rectangle.high().latitude()`. This will result in an empty latitude range. A rectangle viewport cannot be wider than 180 degrees." } }, "type": "object" diff --git a/places/v1/places-gen.go b/places/v1/places-gen.go index 1014fe38466..b788078fe20 100644 --- a/places/v1/places-gen.go +++ b/places/v1/places-gen.go @@ -1775,7 +1775,10 @@ type GoogleMapsPlacesV1SearchTextRequestLocationBias struct { // Rectangle: A rectangle box defined by northeast and southwest corner. // `rectangle.high()` must be the northeast point of the rectangle // viewport. `rectangle.low()` must be the southwest point of the - // rectangle viewport. + // rectangle viewport. `rectangle.low().latitude()` cannot be greater + // than `rectangle.high().latitude()`. This will result in an empty + // latitude range. A rectangle viewport cannot be wider than 180 + // degrees. Rectangle *GoogleGeoTypeViewport `json:"rectangle,omitempty"` // ForceSendFields is a list of field names (e.g. "Circle") to @@ -1808,7 +1811,10 @@ type GoogleMapsPlacesV1SearchTextRequestLocationRestriction struct { // Rectangle: A rectangle box defined by northeast and southwest corner. // `rectangle.high()` must be the northeast point of the rectangle // viewport. `rectangle.low()` must be the southwest point of the - // rectangle viewport. + // rectangle viewport. `rectangle.low().latitude()` cannot be greater + // than `rectangle.high().latitude()`. This will result in an empty + // latitude range. A rectangle viewport cannot be wider than 180 + // degrees. Rectangle *GoogleGeoTypeViewport `json:"rectangle,omitempty"` // ForceSendFields is a list of field names (e.g. "Rectangle") to diff --git a/policysimulator/v1/policysimulator-api.json b/policysimulator/v1/policysimulator-api.json index df2e14d192c..174b73cdfe7 100644 --- a/policysimulator/v1/policysimulator-api.json +++ b/policysimulator/v1/policysimulator-api.json @@ -707,7 +707,7 @@ } } }, - "revision": "20230917", + "revision": "20231203", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -823,7 +823,7 @@ "id": "GoogleCloudOrgpolicyV2PolicySpec", "properties": { "etag": { - "description": "An opaque tag indicating the current version of the policy, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy` is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policy to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", + "description": "An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", "type": "string" }, "inheritFromParent": { diff --git a/policysimulator/v1/policysimulator-gen.go b/policysimulator/v1/policysimulator-gen.go index 64340683919..02977a09c48 100644 --- a/policysimulator/v1/policysimulator-gen.go +++ b/policysimulator/v1/policysimulator-gen.go @@ -511,11 +511,11 @@ func (s *GoogleCloudOrgpolicyV2Policy) MarshalJSON() ([]byte, error) { // specification which is used to specify constraints for configurations // of Google Cloud resources. type GoogleCloudOrgpolicyV2PolicySpec struct { - // Etag: An opaque tag indicating the current version of the policy, + // Etag: An opaque tag indicating the current version of the policySpec, // used for concurrency control. This field is ignored if used in a - // `CreatePolicy` request. When the policy` is returned from either a + // `CreatePolicy` request. When the policy is returned from either a // `GetPolicy` or a `ListPolicies` request, this `etag` indicates the - // version of the current policy to use when executing a + // version of the current policySpec to use when executing a // read-modify-write loop. When the policy is returned from a // `GetEffectivePolicy` request, the `etag` will be unset. Etag string `json:"etag,omitempty"` diff --git a/policysimulator/v1alpha/policysimulator-api.json b/policysimulator/v1alpha/policysimulator-api.json index 7ea211e2c0d..955b1b05fcb 100644 --- a/policysimulator/v1alpha/policysimulator-api.json +++ b/policysimulator/v1alpha/policysimulator-api.json @@ -1047,7 +1047,7 @@ } } }, - "revision": "20230917", + "revision": "20231203", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1163,7 +1163,7 @@ "id": "GoogleCloudOrgpolicyV2PolicySpec", "properties": { "etag": { - "description": "An opaque tag indicating the current version of the policy, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy` is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policy to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", + "description": "An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", "type": "string" }, "inheritFromParent": { diff --git a/policysimulator/v1alpha/policysimulator-gen.go b/policysimulator/v1alpha/policysimulator-gen.go index aa36135ecd4..4604dae380c 100644 --- a/policysimulator/v1alpha/policysimulator-gen.go +++ b/policysimulator/v1alpha/policysimulator-gen.go @@ -595,11 +595,11 @@ func (s *GoogleCloudOrgpolicyV2Policy) MarshalJSON() ([]byte, error) { // specification which is used to specify constraints for configurations // of Google Cloud resources. type GoogleCloudOrgpolicyV2PolicySpec struct { - // Etag: An opaque tag indicating the current version of the policy, + // Etag: An opaque tag indicating the current version of the policySpec, // used for concurrency control. This field is ignored if used in a - // `CreatePolicy` request. When the policy` is returned from either a + // `CreatePolicy` request. When the policy is returned from either a // `GetPolicy` or a `ListPolicies` request, this `etag` indicates the - // version of the current policy to use when executing a + // version of the current policySpec to use when executing a // read-modify-write loop. When the policy is returned from a // `GetEffectivePolicy` request, the `etag` will be unset. Etag string `json:"etag,omitempty"` diff --git a/policysimulator/v1beta/policysimulator-api.json b/policysimulator/v1beta/policysimulator-api.json index fb863274a50..adcd1598747 100644 --- a/policysimulator/v1beta/policysimulator-api.json +++ b/policysimulator/v1beta/policysimulator-api.json @@ -1047,7 +1047,7 @@ } } }, - "revision": "20230917", + "revision": "20231203", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1163,7 +1163,7 @@ "id": "GoogleCloudOrgpolicyV2PolicySpec", "properties": { "etag": { - "description": "An opaque tag indicating the current version of the policy, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy` is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policy to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", + "description": "An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", "type": "string" }, "inheritFromParent": { diff --git a/policysimulator/v1beta/policysimulator-gen.go b/policysimulator/v1beta/policysimulator-gen.go index 1ff7111d42a..28af9f7dfa6 100644 --- a/policysimulator/v1beta/policysimulator-gen.go +++ b/policysimulator/v1beta/policysimulator-gen.go @@ -595,11 +595,11 @@ func (s *GoogleCloudOrgpolicyV2Policy) MarshalJSON() ([]byte, error) { // specification which is used to specify constraints for configurations // of Google Cloud resources. type GoogleCloudOrgpolicyV2PolicySpec struct { - // Etag: An opaque tag indicating the current version of the policy, + // Etag: An opaque tag indicating the current version of the policySpec, // used for concurrency control. This field is ignored if used in a - // `CreatePolicy` request. When the policy` is returned from either a + // `CreatePolicy` request. When the policy is returned from either a // `GetPolicy` or a `ListPolicies` request, this `etag` indicates the - // version of the current policy to use when executing a + // version of the current policySpec to use when executing a // read-modify-write loop. When the policy is returned from a // `GetEffectivePolicy` request, the `etag` will be unset. Etag string `json:"etag,omitempty"` diff --git a/recommender/v1/recommender-api.json b/recommender/v1/recommender-api.json index a0fa97c376e..ce7aa8297b6 100644 --- a/recommender/v1/recommender-api.json +++ b/recommender/v1/recommender-api.json @@ -1686,7 +1686,7 @@ } } }, - "revision": "20231112", + "revision": "20231203", "rootUrl": "https://recommender.googleapis.com/", "schemas": { "GoogleCloudRecommenderV1CostProjection": { @@ -1697,6 +1697,10 @@ "$ref": "GoogleTypeMoney", "description": "An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices." }, + "costInLocalCurrency": { + "$ref": "GoogleTypeMoney", + "description": "The approximate cost savings in the billing account's local currency." + }, "duration": { "description": "Duration for which this cost applies.", "format": "google-duration", @@ -1737,7 +1741,7 @@ }, "reliabilityProjection": { "$ref": "GoogleCloudRecommenderV1ReliabilityProjection", - "description": "Use with CategoryType.RELAIBILITY" + "description": "Use with CategoryType.RELIABILITY" }, "securityProjection": { "$ref": "GoogleCloudRecommenderV1SecurityProjection", diff --git a/recommender/v1/recommender-gen.go b/recommender/v1/recommender-gen.go index 69ef470a5d7..69ba8183799 100644 --- a/recommender/v1/recommender-gen.go +++ b/recommender/v1/recommender-gen.go @@ -446,6 +446,10 @@ type GoogleCloudRecommenderV1CostProjection struct { // cost is computed using list prices or custom contract prices. Cost *GoogleTypeMoney `json:"cost,omitempty"` + // CostInLocalCurrency: The approximate cost savings in the billing + // account's local currency. + CostInLocalCurrency *GoogleTypeMoney `json:"costInLocalCurrency,omitempty"` + // Duration: Duration for which this cost applies. Duration string `json:"duration,omitempty"` @@ -496,7 +500,7 @@ type GoogleCloudRecommenderV1Impact struct { // CostProjection: Use with CategoryType.COST CostProjection *GoogleCloudRecommenderV1CostProjection `json:"costProjection,omitempty"` - // ReliabilityProjection: Use with CategoryType.RELAIBILITY + // ReliabilityProjection: Use with CategoryType.RELIABILITY ReliabilityProjection *GoogleCloudRecommenderV1ReliabilityProjection `json:"reliabilityProjection,omitempty"` // SecurityProjection: Use with CategoryType.SECURITY diff --git a/recommender/v1beta1/recommender-api.json b/recommender/v1beta1/recommender-api.json index 4153ea30b12..e1ca94581e9 100644 --- a/recommender/v1beta1/recommender-api.json +++ b/recommender/v1beta1/recommender-api.json @@ -1748,7 +1748,7 @@ } } }, - "revision": "20231008", + "revision": "20231203", "rootUrl": "https://recommender.googleapis.com/", "schemas": { "GoogleCloudRecommenderV1beta1CostProjection": { @@ -1767,6 +1767,20 @@ "description": "Duration for which this cost applies.", "format": "google-duration", "type": "string" + }, + "pricingType": { + "description": "How the cost is calculated.", + "enum": [ + "PRICING_TYPE_UNSPECIFIED", + "LIST_PRICE", + "CUSTOM_PRICE" + ], + "enumDescriptions": [ + "Default pricing type.", + "The price listed by GCP for all customers.", + "A price derived from past usage and billing." + ], + "type": "string" } }, "type": "object" @@ -1961,7 +1975,7 @@ "id": "GoogleCloudRecommenderV1beta1InsightType", "properties": { "name": { - "description": "The insight_type’s name in format insightTypes/{insight_type} eg: insightTypes/google.iam.policy.Insight", + "description": "The insight_type's name in format insightTypes/{insight_type} eg: insightTypes/google.iam.policy.Insight", "type": "string" } }, diff --git a/recommender/v1beta1/recommender-gen.go b/recommender/v1beta1/recommender-gen.go index db3120f5f87..684edcf8cf9 100644 --- a/recommender/v1beta1/recommender-gen.go +++ b/recommender/v1beta1/recommender-gen.go @@ -477,6 +477,14 @@ type GoogleCloudRecommenderV1beta1CostProjection struct { // Duration: Duration for which this cost applies. Duration string `json:"duration,omitempty"` + // PricingType: How the cost is calculated. + // + // Possible values: + // "PRICING_TYPE_UNSPECIFIED" - Default pricing type. + // "LIST_PRICE" - The price listed by GCP for all customers. + // "CUSTOM_PRICE" - A price derived from past usage and billing. + PricingType string `json:"pricingType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cost") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -730,7 +738,7 @@ func (s *GoogleCloudRecommenderV1beta1InsightStateInfo) MarshalJSON() ([]byte, e // GoogleCloudRecommenderV1beta1InsightType: The type of insight. type GoogleCloudRecommenderV1beta1InsightType struct { - // Name: The insight_type’s name in format insightTypes/{insight_type} + // Name: The insight_type's name in format insightTypes/{insight_type} // eg: insightTypes/google.iam.policy.Insight Name string `json:"name,omitempty"` diff --git a/storagetransfer/v1/storagetransfer-api.json b/storagetransfer/v1/storagetransfer-api.json index ec974052250..ba56ad5163f 100644 --- a/storagetransfer/v1/storagetransfer-api.json +++ b/storagetransfer/v1/storagetransfer-api.json @@ -632,7 +632,7 @@ } } }, - "revision": "20230831", + "revision": "20231130", "rootUrl": "https://storagetransfer.googleapis.com/", "schemas": { "AgentPool": { @@ -730,7 +730,7 @@ "type": "string" }, "credentialsSecret": { - "description": "Optional. The Resource name of a secret in Secret Manager. The Azure SAS token must be stored in Secret Manager in JSON format: { \"sas_token\" : \"SAS_TOKEN\" } GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Microsoft Azure Blob Storage] (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) for more information. If `credentials_secret` is specified, do not specify azure_credentials. This feature is in [preview](https://cloud.google.com/terms/service-terms#1). Format: `projects/{project_number}/secrets/{secret_name}`", + "description": "Optional. The Resource name of a secret in Secret Manager. AWS credentials must be stored in Secret Manager in JSON format: { \"access_key_id\": \"ACCESS_KEY_ID\", \"secret_access_key\": \"SECRET_ACCESS_KEY\" } GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Amazon S3] (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) for more information. If `credentials_secret` is specified, do not specify role_arn or aws_access_key. This feature is in [preview](https://cloud.google.com/terms/service-terms#1). Format: `projects/{project_number}/secrets/{secret_name}`", "type": "string" }, "path": { diff --git a/storagetransfer/v1/storagetransfer-gen.go b/storagetransfer/v1/storagetransfer-gen.go index 48073655a86..d66798b392a 100644 --- a/storagetransfer/v1/storagetransfer-gen.go +++ b/storagetransfer/v1/storagetransfer-gen.go @@ -365,13 +365,14 @@ type AwsS3Data struct { CloudfrontDomain string `json:"cloudfrontDomain,omitempty"` // CredentialsSecret: Optional. The Resource name of a secret in Secret - // Manager. The Azure SAS token must be stored in Secret Manager in JSON - // format: { "sas_token" : "SAS_TOKEN" } GoogleServiceAccount must be - // granted `roles/secretmanager.secretAccessor` for the resource. See - // [Configure access to a source: Microsoft Azure Blob Storage] - // (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) + // Manager. AWS credentials must be stored in Secret Manager in JSON + // format: { "access_key_id": "ACCESS_KEY_ID", "secret_access_key": + // "SECRET_ACCESS_KEY" } GoogleServiceAccount must be granted + // `roles/secretmanager.secretAccessor` for the resource. See [Configure + // access to a source: Amazon S3] + // (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) // for more information. If `credentials_secret` is specified, do not - // specify azure_credentials. This feature is in preview + // specify role_arn or aws_access_key. This feature is in preview // (https://cloud.google.com/terms/service-terms#1). Format: // `projects/{project_number}/secrets/{secret_name}` CredentialsSecret string `json:"credentialsSecret,omitempty"` diff --git a/streetviewpublish/v1/streetviewpublish-api.json b/streetviewpublish/v1/streetviewpublish-api.json index 7a8bbc9ef6a..5921e0f1cde 100644 --- a/streetviewpublish/v1/streetviewpublish-api.json +++ b/streetviewpublish/v1/streetviewpublish-api.json @@ -534,7 +534,7 @@ } } }, - "revision": "20230806", + "revision": "20231203", "rootUrl": "https://streetviewpublish.googleapis.com/", "schemas": { "BatchDeletePhotosRequest": { @@ -1060,7 +1060,8 @@ "UNSUPPORTED_CAMERA", "NOT_OUTDOORS", "INSUFFICIENT_VIDEO_FRAMES", - "INSUFFICIENT_MOVEMENT" + "INSUFFICIENT_MOVEMENT", + "MAST_DOWN" ], "enumDescriptions": [ "The failure reason is unspecified, this is the default value.", @@ -1085,7 +1086,8 @@ "The camera is not supported.", "Some frames were indoors, which is unsupported.", "Not enough video frames.", - "Not enough moving data." + "Not enough moving data.", + "Mast is down." ], "readOnly": true, "type": "string" diff --git a/streetviewpublish/v1/streetviewpublish-gen.go b/streetviewpublish/v1/streetviewpublish-gen.go index d5255b6def2..ca0b181c422 100644 --- a/streetviewpublish/v1/streetviewpublish-gen.go +++ b/streetviewpublish/v1/streetviewpublish-gen.go @@ -1154,6 +1154,7 @@ type PhotoSequence struct { // "NOT_OUTDOORS" - Some frames were indoors, which is unsupported. // "INSUFFICIENT_VIDEO_FRAMES" - Not enough video frames. // "INSUFFICIENT_MOVEMENT" - Not enough moving data. + // "MAST_DOWN" - Mast is down. FailureReason string `json:"failureReason,omitempty"` // Filename: Output only. The filename of the upload. Does not include diff --git a/translate/v3/translate-api.json b/translate/v3/translate-api.json index 5260e58f1bd..79c44987db8 100644 --- a/translate/v3/translate-api.json +++ b/translate/v3/translate-api.json @@ -135,7 +135,8 @@ "$ref": "DetectLanguageResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "getSupportedLanguages": { @@ -170,7 +171,8 @@ "$ref": "SupportedLanguages" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "romanizeText": { @@ -198,7 +200,8 @@ "$ref": "RomanizeTextResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "translateText": { @@ -226,13 +229,43 @@ "$ref": "TranslateTextResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] } }, "resources": { "locations": { "methods": { + "adaptiveMtTranslate": { + "description": "Translate text using Adaptive MT.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}:adaptiveMtTranslate", + "httpMethod": "POST", + "id": "translate.projects.locations.adaptiveMtTranslate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+parent}:adaptiveMtTranslate", + "request": { + "$ref": "AdaptiveMtTranslateRequest" + }, + "response": { + "$ref": "AdaptiveMtTranslateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + }, "batchTranslateDocument": { "description": "Translates a large volume of document in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.", "flatPath": "v3/projects/{projectsId}/locations/{locationsId}:batchTranslateDocument", @@ -314,7 +347,8 @@ "$ref": "DetectLanguageResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "get": { @@ -375,7 +409,8 @@ "$ref": "SupportedLanguages" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "list": { @@ -445,7 +480,8 @@ "$ref": "RomanizeTextResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "translateDocument": { @@ -502,11 +538,345 @@ "$ref": "TranslateTextResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] } }, "resources": { + "adaptiveMtDatasets": { + "methods": { + "create": { + "description": "Creates an Adaptive MT dataset.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets", + "httpMethod": "POST", + "id": "translate.projects.locations.adaptiveMtDatasets.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Name of the parent project. In form of `projects/{project-number-or-id}/locations/{location-id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+parent}/adaptiveMtDatasets", + "request": { + "$ref": "AdaptiveMtDataset" + }, + "response": { + "$ref": "AdaptiveMtDataset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + }, + "delete": { + "description": "Deletes an Adaptive MT dataset, including all its entries and associated metadata.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}", + "httpMethod": "DELETE", + "id": "translate.projects.locations.adaptiveMtDatasets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the dataset. In the form of `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + }, + "get": { + "description": "Gets the Adaptive MT dataset.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}", + "httpMethod": "GET", + "id": "translate.projects.locations.adaptiveMtDatasets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the dataset. In the form of `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "AdaptiveMtDataset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + }, + "importAdaptiveMtFile": { + "description": "Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}:importAdaptiveMtFile", + "httpMethod": "POST", + "id": "translate.projects.locations.adaptiveMtDatasets.importAdaptiveMtFile", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+parent}:importAdaptiveMtFile", + "request": { + "$ref": "ImportAdaptiveMtFileRequest" + }, + "response": { + "$ref": "ImportAdaptiveMtFileResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + }, + "list": { + "description": "Lists all Adaptive MT datasets for which the caller has read permission.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets", + "httpMethod": "GET", + "id": "translate.projects.locations.adaptiveMtDatasets.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request. Filter is not supported yet.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. The server may return fewer results than requested. If unspecified, the server picks an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtDatasetsResponse.next_page_token returned from the previous call to `ListAdaptiveMtDatasets` method. The first page is returned if `page_token`is empty or missing.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the project from which to list the Adaptive MT datasets. `projects/{project-number-or-id}/locations/{location-id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+parent}/adaptiveMtDatasets", + "response": { + "$ref": "ListAdaptiveMtDatasetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + } + }, + "resources": { + "adaptiveMtFiles": { + "methods": { + "delete": { + "description": "Deletes an AdaptiveMtFile along with its sentences.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles/{adaptiveMtFilesId}", + "httpMethod": "DELETE", + "id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the file to delete, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/files/{file}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + }, + "get": { + "description": "Gets and AdaptiveMtFile", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles/{adaptiveMtFilesId}", + "httpMethod": "GET", + "id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/files/{file}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "AdaptiveMtFile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + }, + "list": { + "description": "Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles", + "httpMethod": "GET", + "id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. ", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtFilesResponse.next_page_token returned from the previous call to `ListAdaptiveMtFiles` method. The first page is returned if `page_token`is empty or missing.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the project from which to list the Adaptive MT files. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+parent}/adaptiveMtFiles", + "response": { + "$ref": "ListAdaptiveMtFilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + } + }, + "resources": { + "adaptiveMtSentences": { + "methods": { + "list": { + "description": "Lists all AdaptiveMtSentences under a given file/dataset.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles/{adaptiveMtFilesId}/adaptiveMtSentences", + "httpMethod": "GET", + "id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.adaptiveMtSentences.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtSentencesRequest.next_page_token returned from the previous call to `ListTranslationMemories` method. The first page is returned if `page_token` is empty or missing.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the project from which to list the Adaptive MT files. The following format lists all sentences under a file. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` The following format lists all sentences within a dataset. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+parent}/adaptiveMtSentences", + "response": { + "$ref": "ListAdaptiveMtSentencesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + } + } + } + } + }, + "adaptiveMtSentences": { + "methods": { + "list": { + "description": "Lists all AdaptiveMtSentences under a given file/dataset.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtSentences", + "httpMethod": "GET", + "id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtSentences.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtSentencesRequest.next_page_token returned from the previous call to `ListTranslationMemories` method. The first page is returned if `page_token` is empty or missing.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the project from which to list the Adaptive MT files. The following format lists all sentences under a file. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` The following format lists all sentences within a dataset. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+parent}/adaptiveMtSentences", + "response": { + "$ref": "ListAdaptiveMtSentencesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" + ] + } + } + } + } + }, "datasets": { "methods": { "create": { @@ -534,7 +904,8 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "delete": { @@ -614,7 +985,8 @@ "$ref": "Dataset" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "importData": { @@ -679,7 +1051,8 @@ "$ref": "ListDatasetsResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] } }, @@ -784,7 +1157,8 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "get": { @@ -809,7 +1183,8 @@ "$ref": "Glossary" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "list": { @@ -850,7 +1225,8 @@ "$ref": "ListGlossariesResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "patch": { @@ -968,7 +1344,8 @@ "$ref": "GlossaryEntry" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "list": { @@ -1004,7 +1381,8 @@ "$ref": "ListGlossaryEntriesResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "patch": { @@ -1161,7 +1539,8 @@ "$ref": "ListModelsResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] } } @@ -1327,9 +1706,162 @@ } } }, - "revision": "20231013", + "revision": "20231201", "rootUrl": "https://translation.googleapis.com/", "schemas": { + "AdaptiveMtDataset": { + "description": "An Adaptive MT Dataset.", + "id": "AdaptiveMtDataset", + "properties": { + "createTime": { + "description": "Output only. Timestamp when this dataset was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.", + "type": "string" + }, + "exampleCount": { + "description": "The number of examples in the dataset.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Required. The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`", + "type": "string" + }, + "sourceLanguageCode": { + "description": "The BCP-47 language code of the source language.", + "type": "string" + }, + "targetLanguageCode": { + "description": "The BCP-47 language code of the target language.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when this dataset was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AdaptiveMtFile": { + "description": "An AdaptiveMtFile.", + "id": "AdaptiveMtFile", + "properties": { + "createTime": { + "description": "Output only. Timestamp when this file was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "The file's display name.", + "type": "string" + }, + "entryCount": { + "description": "The number of entries that the file contains.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/files/{file}`", + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when this file was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AdaptiveMtSentence": { + "description": "An AdaptiveMt sentence entry.", + "id": "AdaptiveMtSentence", + "properties": { + "createTime": { + "description": "Output only. Timestamp when this sentence was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/files/{file}/sentences/{sentence}`", + "type": "string" + }, + "sourceSentence": { + "description": "Required. The source sentence.", + "type": "string" + }, + "targetSentence": { + "description": "Required. The target sentence.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when this sentence was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AdaptiveMtTranslateRequest": { + "description": "The request for sending an AdaptiveMt translation query.", + "id": "AdaptiveMtTranslateRequest", + "properties": { + "content": { + "description": "Required. The content of the input in string format. For now only one sentence per request is supported.", + "items": { + "type": "string" + }, + "type": "array" + }, + "dataset": { + "description": "Required. The resource name for the dataset to use for adaptive MT. `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`", + "type": "string" + } + }, + "type": "object" + }, + "AdaptiveMtTranslateResponse": { + "description": "An AdaptiveMtTranslate response.", + "id": "AdaptiveMtTranslateResponse", + "properties": { + "languageCode": { + "description": "Output only. The translation's language code.", + "readOnly": true, + "type": "string" + }, + "translations": { + "description": "Output only. The translation.", + "items": { + "$ref": "AdaptiveMtTranslation" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "AdaptiveMtTranslation": { + "description": "An AdaptiveMt translation.", + "id": "AdaptiveMtTranslation", + "properties": { + "translatedText": { + "description": "Output only. The translated text.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "BatchDocumentInputConfig": { "description": "Input configuration for BatchTranslateDocument request.", "id": "BatchDocumentInputConfig", @@ -1710,6 +2242,26 @@ }, "type": "object" }, + "FileInputSource": { + "description": "An inlined file.", + "id": "FileInputSource", + "properties": { + "content": { + "description": "Required. The file's byte contents.", + "format": "byte", + "type": "string" + }, + "displayName": { + "description": "Required. The file's display name.", + "type": "string" + }, + "mimeType": { + "description": "Required. The file's mime type.", + "type": "string" + } + }, + "type": "object" + }, "GcsDestination": { "description": "The Google Cloud Storage location for the output content.", "id": "GcsDestination", @@ -1877,6 +2429,33 @@ }, "type": "object" }, + "ImportAdaptiveMtFileRequest": { + "description": "The request for importing an AdaptiveMt file along with its sentences.", + "id": "ImportAdaptiveMtFileRequest", + "properties": { + "fileInputSource": { + "$ref": "FileInputSource", + "description": "Inline file source." + }, + "gcsInputSource": { + "$ref": "GcsInputSource", + "description": "Google Cloud Storage file source." + } + }, + "type": "object" + }, + "ImportAdaptiveMtFileResponse": { + "description": "The response for importing an AdaptiveMtFile", + "id": "ImportAdaptiveMtFileResponse", + "properties": { + "adaptiveMtFile": { + "$ref": "AdaptiveMtFile", + "description": "Output only. The Adaptive MT file that was imported.", + "readOnly": true + } + }, + "type": "object" + }, "ImportDataRequest": { "description": "Request message for ImportData.", "id": "ImportDataRequest", @@ -1947,6 +2526,63 @@ }, "type": "object" }, + "ListAdaptiveMtDatasetsResponse": { + "description": "A list of AdaptiveMtDatasets.", + "id": "ListAdaptiveMtDatasetsResponse", + "properties": { + "adaptiveMtDatasets": { + "description": "Output only. A list of Adaptive MT datasets.", + "items": { + "$ref": "AdaptiveMtDataset" + }, + "readOnly": true, + "type": "array" + }, + "nextPageToken": { + "description": "Optional. A token to retrieve a page of results. Pass this value in the [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to `ListAdaptiveMtDatasets` method to retrieve the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ListAdaptiveMtFilesResponse": { + "description": "The response for listing all AdaptiveMt files under a given dataset.", + "id": "ListAdaptiveMtFilesResponse", + "properties": { + "adaptiveMtFiles": { + "description": "Output only. The Adaptive MT files.", + "items": { + "$ref": "AdaptiveMtFile" + }, + "readOnly": true, + "type": "array" + }, + "nextPageToken": { + "description": "Optional. A token to retrieve a page of results. Pass this value in the ListAdaptiveMtFilesRequest.page_token field in the subsequent call to `ListAdaptiveMtFiles` method to retrieve the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ListAdaptiveMtSentencesResponse": { + "description": "List AdaptiveMt sentences response.", + "id": "ListAdaptiveMtSentencesResponse", + "properties": { + "adaptiveMtSentences": { + "description": "Output only. The list of AdaptiveMtSentences.", + "items": { + "$ref": "AdaptiveMtSentence" + }, + "readOnly": true, + "type": "array" + }, + "nextPageToken": { + "description": "Optional. ", + "type": "string" + } + }, + "type": "object" + }, "ListDatasetsResponse": { "description": "Response message for ListDatasets.", "id": "ListDatasetsResponse", diff --git a/translate/v3/translate-gen.go b/translate/v3/translate-gen.go index fb68d9a9cb2..9cecc7305bf 100644 --- a/translate/v3/translate-gen.go +++ b/translate/v3/translate-gen.go @@ -176,6 +176,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.AdaptiveMtDatasets = NewProjectsLocationsAdaptiveMtDatasetsService(s) rs.Datasets = NewProjectsLocationsDatasetsService(s) rs.Glossaries = NewProjectsLocationsGlossariesService(s) rs.Models = NewProjectsLocationsModelsService(s) @@ -186,6 +187,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + AdaptiveMtDatasets *ProjectsLocationsAdaptiveMtDatasetsService + Datasets *ProjectsLocationsDatasetsService Glossaries *ProjectsLocationsGlossariesService @@ -195,6 +198,51 @@ type ProjectsLocationsService struct { Operations *ProjectsLocationsOperationsService } +func NewProjectsLocationsAdaptiveMtDatasetsService(s *Service) *ProjectsLocationsAdaptiveMtDatasetsService { + rs := &ProjectsLocationsAdaptiveMtDatasetsService{s: s} + rs.AdaptiveMtFiles = NewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService(s) + rs.AdaptiveMtSentences = NewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService(s) + return rs +} + +type ProjectsLocationsAdaptiveMtDatasetsService struct { + s *Service + + AdaptiveMtFiles *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService + + AdaptiveMtSentences *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService +} + +func NewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService(s *Service) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService { + rs := &ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService{s: s} + rs.AdaptiveMtSentences = NewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService(s) + return rs +} + +type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService struct { + s *Service + + AdaptiveMtSentences *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService +} + +func NewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService(s *Service) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService { + rs := &ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService{s: s} + return rs +} + +type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService struct { + s *Service +} + +func NewProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService(s *Service) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService { + rs := &ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService{s: s} + return rs +} + +type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService struct { + s *Service +} + func NewProjectsLocationsDatasetsService(s *Service) *ProjectsLocationsDatasetsService { rs := &ProjectsLocationsDatasetsService{s: s} rs.Examples = NewProjectsLocationsDatasetsExamplesService(s) @@ -255,6 +303,250 @@ type ProjectsLocationsOperationsService struct { s *Service } +// AdaptiveMtDataset: An Adaptive MT Dataset. +type AdaptiveMtDataset struct { + // CreateTime: Output only. Timestamp when this dataset was created. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: The name of the dataset to show in the interface. The + // name can be up to 32 characters long and can consist only of ASCII + // Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9. + DisplayName string `json:"displayName,omitempty"` + + // ExampleCount: The number of examples in the dataset. + ExampleCount int64 `json:"exampleCount,omitempty"` + + // Name: Required. The resource name of the dataset, in form of + // `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDat + // asets/{dataset_id}` + Name string `json:"name,omitempty"` + + // SourceLanguageCode: The BCP-47 language code of the source language. + SourceLanguageCode string `json:"sourceLanguageCode,omitempty"` + + // TargetLanguageCode: The BCP-47 language code of the target language. + TargetLanguageCode string `json:"targetLanguageCode,omitempty"` + + // UpdateTime: Output only. Timestamp when this dataset was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AdaptiveMtDataset) MarshalJSON() ([]byte, error) { + type NoMethod AdaptiveMtDataset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AdaptiveMtFile: An AdaptiveMtFile. +type AdaptiveMtFile struct { + // CreateTime: Output only. Timestamp when this file was created. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: The file's display name. + DisplayName string `json:"displayName,omitempty"` + + // EntryCount: The number of entries that the file contains. + EntryCount int64 `json:"entryCount,omitempty"` + + // Name: Required. The resource name of the file, in form of + // `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDat + // asets/{dataset}/files/{file}` + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. Timestamp when this file was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AdaptiveMtFile) MarshalJSON() ([]byte, error) { + type NoMethod AdaptiveMtFile + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AdaptiveMtSentence: An AdaptiveMt sentence entry. +type AdaptiveMtSentence struct { + // CreateTime: Output only. Timestamp when this sentence was created. + CreateTime string `json:"createTime,omitempty"` + + // Name: Required. The resource name of the file, in form of + // `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDat + // asets/{dataset}/files/{file}/sentences/{sentence}` + Name string `json:"name,omitempty"` + + // SourceSentence: Required. The source sentence. + SourceSentence string `json:"sourceSentence,omitempty"` + + // TargetSentence: Required. The target sentence. + TargetSentence string `json:"targetSentence,omitempty"` + + // UpdateTime: Output only. Timestamp when this sentence was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AdaptiveMtSentence) MarshalJSON() ([]byte, error) { + type NoMethod AdaptiveMtSentence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AdaptiveMtTranslateRequest: The request for sending an AdaptiveMt +// translation query. +type AdaptiveMtTranslateRequest struct { + // Content: Required. The content of the input in string format. For now + // only one sentence per request is supported. + Content []string `json:"content,omitempty"` + + // Dataset: Required. The resource name for the dataset to use for + // adaptive MT. + // `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{datase + // t}` + Dataset string `json:"dataset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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 *AdaptiveMtTranslateRequest) MarshalJSON() ([]byte, error) { + type NoMethod AdaptiveMtTranslateRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AdaptiveMtTranslateResponse: An AdaptiveMtTranslate response. +type AdaptiveMtTranslateResponse struct { + // LanguageCode: Output only. The translation's language code. + LanguageCode string `json:"languageCode,omitempty"` + + // Translations: Output only. The translation. + Translations []*AdaptiveMtTranslation `json:"translations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "LanguageCode") 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. "LanguageCode") 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 *AdaptiveMtTranslateResponse) MarshalJSON() ([]byte, error) { + type NoMethod AdaptiveMtTranslateResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AdaptiveMtTranslation: An AdaptiveMt translation. +type AdaptiveMtTranslation struct { + // TranslatedText: Output only. The translated text. + TranslatedText string `json:"translatedText,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TranslatedText") 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. "TranslatedText") 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 *AdaptiveMtTranslation) MarshalJSON() ([]byte, error) { + type NoMethod AdaptiveMtTranslation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BatchDocumentInputConfig: Input configuration for // BatchTranslateDocument request. type BatchDocumentInputConfig struct { @@ -1014,6 +1306,40 @@ func (s *ExportDataRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FileInputSource: An inlined file. +type FileInputSource struct { + // Content: Required. The file's byte contents. + Content string `json:"content,omitempty"` + + // DisplayName: Required. The file's display name. + DisplayName string `json:"displayName,omitempty"` + + // MimeType: Required. The file's mime type. + MimeType string `json:"mimeType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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 *FileInputSource) MarshalJSON() ([]byte, error) { + type NoMethod FileInputSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GcsDestination: The Google Cloud Storage location for the output // content. type GcsDestination struct { @@ -1376,12 +1702,16 @@ func (s *GlossaryTermsSet) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ImportDataRequest: Request message for ImportData. -type ImportDataRequest struct { - // InputConfig: Required. The config for the input content. - InputConfig *DatasetInputConfig `json:"inputConfig,omitempty"` +// ImportAdaptiveMtFileRequest: The request for importing an AdaptiveMt +// file along with its sentences. +type ImportAdaptiveMtFileRequest struct { + // FileInputSource: Inline file source. + FileInputSource *FileInputSource `json:"fileInputSource,omitempty"` - // ForceSendFields is a list of field names (e.g. "InputConfig") to + // GcsInputSource: Google Cloud Storage file source. + GcsInputSource *GcsInputSource `json:"gcsInputSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FileInputSource") 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 @@ -1389,15 +1719,78 @@ type ImportDataRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InputConfig") 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:"-"` -} - + // NullFields is a list of field names (e.g. "FileInputSource") 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 *ImportAdaptiveMtFileRequest) MarshalJSON() ([]byte, error) { + type NoMethod ImportAdaptiveMtFileRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImportAdaptiveMtFileResponse: The response for importing an +// AdaptiveMtFile +type ImportAdaptiveMtFileResponse struct { + // AdaptiveMtFile: Output only. The Adaptive MT file that was imported. + AdaptiveMtFile *AdaptiveMtFile `json:"adaptiveMtFile,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AdaptiveMtFile") 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. "AdaptiveMtFile") 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 *ImportAdaptiveMtFileResponse) MarshalJSON() ([]byte, error) { + type NoMethod ImportAdaptiveMtFileResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImportDataRequest: Request message for ImportData. +type ImportDataRequest struct { + // InputConfig: Required. The config for the input content. + InputConfig *DatasetInputConfig `json:"inputConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InputConfig") 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. "InputConfig") 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 *ImportDataRequest) MarshalJSON() ([]byte, error) { type NoMethod ImportDataRequest raw := NoMethod(*s) @@ -1551,6 +1944,121 @@ func (s *LanguageCodesSet) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListAdaptiveMtDatasetsResponse: A list of AdaptiveMtDatasets. +type ListAdaptiveMtDatasetsResponse struct { + // AdaptiveMtDatasets: Output only. A list of Adaptive MT datasets. + AdaptiveMtDatasets []*AdaptiveMtDataset `json:"adaptiveMtDatasets,omitempty"` + + // NextPageToken: Optional. A token to retrieve a page of results. Pass + // this value in the [ListAdaptiveMtDatasetsRequest.page_token] field in + // the subsequent call to `ListAdaptiveMtDatasets` method to retrieve + // the next page of results. + 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. "AdaptiveMtDatasets") + // 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. "AdaptiveMtDatasets") 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 *ListAdaptiveMtDatasetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAdaptiveMtDatasetsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListAdaptiveMtFilesResponse: The response for listing all AdaptiveMt +// files under a given dataset. +type ListAdaptiveMtFilesResponse struct { + // AdaptiveMtFiles: Output only. The Adaptive MT files. + AdaptiveMtFiles []*AdaptiveMtFile `json:"adaptiveMtFiles,omitempty"` + + // NextPageToken: Optional. A token to retrieve a page of results. Pass + // this value in the ListAdaptiveMtFilesRequest.page_token field in the + // subsequent call to `ListAdaptiveMtFiles` method to retrieve the next + // page of results. + 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. "AdaptiveMtFiles") 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. "AdaptiveMtFiles") 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 *ListAdaptiveMtFilesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAdaptiveMtFilesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListAdaptiveMtSentencesResponse: List AdaptiveMt sentences response. +type ListAdaptiveMtSentencesResponse struct { + // AdaptiveMtSentences: Output only. The list of AdaptiveMtSentences. + AdaptiveMtSentences []*AdaptiveMtSentence `json:"adaptiveMtSentences,omitempty"` + + // NextPageToken: Optional. + 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. "AdaptiveMtSentences") + // 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. "AdaptiveMtSentences") 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 *ListAdaptiveMtSentencesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAdaptiveMtSentencesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListDatasetsResponse: Response message for ListDatasets. type ListDatasetsResponse struct { // Datasets: The datasets read. @@ -2860,7 +3368,8 @@ func (c *ProjectsDetectLanguageCall) Do(opts ...googleapi.CallOption) (*DetectLa // "$ref": "DetectLanguageResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -3047,7 +3556,8 @@ func (c *ProjectsGetSupportedLanguagesCall) Do(opts ...googleapi.CallOption) (*S // "$ref": "SupportedLanguages" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -3195,7 +3705,8 @@ func (c *ProjectsRomanizeTextCall) Do(opts ...googleapi.CallOption) (*RomanizeTe // "$ref": "RomanizeTextResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -3345,48 +3856,39 @@ func (c *ProjectsTranslateTextCall) Do(opts ...googleapi.CallOption) (*Translate // "$ref": "TranslateTextResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } } -// method id "translate.projects.locations.batchTranslateDocument": +// method id "translate.projects.locations.adaptiveMtTranslate": -type ProjectsLocationsBatchTranslateDocumentCall struct { - s *Service - parent string - batchtranslatedocumentrequest *BatchTranslateDocumentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAdaptiveMtTranslateCall struct { + s *Service + parent string + adaptivemttranslaterequest *AdaptiveMtTranslateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchTranslateDocument: Translates a large volume of document in -// asynchronous batch mode. This function provides real-time output as -// the inputs are being processed. If caller cancels a request, the -// partial results (for an input file, it's all or nothing) may still be -// available on the specified output location. This call returns -// immediately and you can use google.longrunning.Operation.name to poll -// the status of the call. +// AdaptiveMtTranslate: Translate text using Adaptive MT. // // - parent: Location to make a regional call. Format: -// `projects/{project-number-or-id}/locations/{location-id}`. The -// `global` location is not supported for batch translation. Only -// AutoML Translation models or glossaries within the same region -// (have the same location-id) can be used, otherwise an -// INVALID_ARGUMENT (400) error is returned. -func (r *ProjectsLocationsService) BatchTranslateDocument(parent string, batchtranslatedocumentrequest *BatchTranslateDocumentRequest) *ProjectsLocationsBatchTranslateDocumentCall { - c := &ProjectsLocationsBatchTranslateDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project-number-or-id}/locations/{location-id}`. +func (r *ProjectsLocationsService) AdaptiveMtTranslate(parent string, adaptivemttranslaterequest *AdaptiveMtTranslateRequest) *ProjectsLocationsAdaptiveMtTranslateCall { + c := &ProjectsLocationsAdaptiveMtTranslateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.batchtranslatedocumentrequest = batchtranslatedocumentrequest + c.adaptivemttranslaterequest = adaptivemttranslaterequest 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 *ProjectsLocationsBatchTranslateDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchTranslateDocumentCall { +func (c *ProjectsLocationsAdaptiveMtTranslateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtTranslateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3394,21 +3896,21 @@ func (c *ProjectsLocationsBatchTranslateDocumentCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsBatchTranslateDocumentCall) Context(ctx context.Context) *ProjectsLocationsBatchTranslateDocumentCall { +func (c *ProjectsLocationsAdaptiveMtTranslateCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtTranslateCall { 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 *ProjectsLocationsBatchTranslateDocumentCall) Header() http.Header { +func (c *ProjectsLocationsAdaptiveMtTranslateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchTranslateDocumentCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAdaptiveMtTranslateCall) 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_ { @@ -3416,14 +3918,14 @@ func (c *ProjectsLocationsBatchTranslateDocumentCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchtranslatedocumentrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.adaptivemttranslaterequest) 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, "v3/{+parent}:batchTranslateDocument") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+parent}:adaptiveMtTranslate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3436,14 +3938,14 @@ func (c *ProjectsLocationsBatchTranslateDocumentCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "translate.projects.locations.batchTranslateDocument" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsBatchTranslateDocumentCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "translate.projects.locations.adaptiveMtTranslate" call. +// Exactly one of *AdaptiveMtTranslateResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *AdaptiveMtTranslateResponse.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 *ProjectsLocationsAdaptiveMtTranslateCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtTranslateResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3462,7 +3964,7 @@ func (c *ProjectsLocationsBatchTranslateDocumentCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &AdaptiveMtTranslateResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3474,72 +3976,73 @@ func (c *ProjectsLocationsBatchTranslateDocumentCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Translates a large volume of document in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.", - // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}:batchTranslateDocument", + // "description": "Translate text using Adaptive MT.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}:adaptiveMtTranslate", // "httpMethod": "POST", - // "id": "translate.projects.locations.batchTranslateDocument", + // "id": "translate.projects.locations.adaptiveMtTranslate", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.", + // "description": "Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v3/{+parent}:batchTranslateDocument", + // "path": "v3/{+parent}:adaptiveMtTranslate", // "request": { - // "$ref": "BatchTranslateDocumentRequest" + // "$ref": "AdaptiveMtTranslateRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "AdaptiveMtTranslateResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } } -// method id "translate.projects.locations.batchTranslateText": +// method id "translate.projects.locations.batchTranslateDocument": -type ProjectsLocationsBatchTranslateTextCall struct { - s *Service - parent string - batchtranslatetextrequest *BatchTranslateTextRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsBatchTranslateDocumentCall struct { + s *Service + parent string + batchtranslatedocumentrequest *BatchTranslateDocumentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchTranslateText: Translates a large volume of text in asynchronous -// batch mode. This function provides real-time output as the inputs are -// being processed. If caller cancels a request, the partial results -// (for an input file, it's all or nothing) may still be available on -// the specified output location. This call returns immediately and you -// can use google.longrunning.Operation.name to poll the status of the -// call. +// BatchTranslateDocument: Translates a large volume of document in +// asynchronous batch mode. This function provides real-time output as +// the inputs are being processed. If caller cancels a request, the +// partial results (for an input file, it's all or nothing) may still be +// available on the specified output location. This call returns +// immediately and you can use google.longrunning.Operation.name to poll +// the status of the call. // -// - parent: Location to make a call. Must refer to a caller's project. -// Format: `projects/{project-number-or-id}/locations/{location-id}`. -// The `global` location is not supported for batch translation. Only +// - parent: Location to make a regional call. Format: +// `projects/{project-number-or-id}/locations/{location-id}`. The +// `global` location is not supported for batch translation. Only // AutoML Translation models or glossaries within the same region // (have the same location-id) can be used, otherwise an // INVALID_ARGUMENT (400) error is returned. -func (r *ProjectsLocationsService) BatchTranslateText(parent string, batchtranslatetextrequest *BatchTranslateTextRequest) *ProjectsLocationsBatchTranslateTextCall { - c := &ProjectsLocationsBatchTranslateTextCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsService) BatchTranslateDocument(parent string, batchtranslatedocumentrequest *BatchTranslateDocumentRequest) *ProjectsLocationsBatchTranslateDocumentCall { + c := &ProjectsLocationsBatchTranslateDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.batchtranslatetextrequest = batchtranslatetextrequest + c.batchtranslatedocumentrequest = batchtranslatedocumentrequest 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 *ProjectsLocationsBatchTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchTranslateTextCall { +func (c *ProjectsLocationsBatchTranslateDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchTranslateDocumentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3547,14 +4050,167 @@ func (c *ProjectsLocationsBatchTranslateTextCall) Fields(s ...googleapi.Field) * // 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 *ProjectsLocationsBatchTranslateTextCall) Context(ctx context.Context) *ProjectsLocationsBatchTranslateTextCall { +func (c *ProjectsLocationsBatchTranslateDocumentCall) Context(ctx context.Context) *ProjectsLocationsBatchTranslateDocumentCall { 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 *ProjectsLocationsBatchTranslateTextCall) Header() http.Header { +func (c *ProjectsLocationsBatchTranslateDocumentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBatchTranslateDocumentCall) 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.batchtranslatedocumentrequest) + 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, "v3/{+parent}:batchTranslateDocument") + 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 "translate.projects.locations.batchTranslateDocument" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsBatchTranslateDocumentCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Translates a large volume of document in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}:batchTranslateDocument", + // "httpMethod": "POST", + // "id": "translate.projects.locations.batchTranslateDocument", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+parent}:batchTranslateDocument", + // "request": { + // "$ref": "BatchTranslateDocumentRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "translate.projects.locations.batchTranslateText": + +type ProjectsLocationsBatchTranslateTextCall struct { + s *Service + parent string + batchtranslatetextrequest *BatchTranslateTextRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchTranslateText: Translates a large volume of text in asynchronous +// batch mode. This function provides real-time output as the inputs are +// being processed. If caller cancels a request, the partial results +// (for an input file, it's all or nothing) may still be available on +// the specified output location. This call returns immediately and you +// can use google.longrunning.Operation.name to poll the status of the +// call. +// +// - parent: Location to make a call. Must refer to a caller's project. +// Format: `projects/{project-number-or-id}/locations/{location-id}`. +// The `global` location is not supported for batch translation. Only +// AutoML Translation models or glossaries within the same region +// (have the same location-id) can be used, otherwise an +// INVALID_ARGUMENT (400) error is returned. +func (r *ProjectsLocationsService) BatchTranslateText(parent string, batchtranslatetextrequest *BatchTranslateTextRequest) *ProjectsLocationsBatchTranslateTextCall { + c := &ProjectsLocationsBatchTranslateTextCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchtranslatetextrequest = batchtranslatetextrequest + 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 *ProjectsLocationsBatchTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchTranslateTextCall { + 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 *ProjectsLocationsBatchTranslateTextCall) Context(ctx context.Context) *ProjectsLocationsBatchTranslateTextCall { + 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 *ProjectsLocationsBatchTranslateTextCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } @@ -3800,7 +4456,8 @@ func (c *ProjectsLocationsDetectLanguageCall) Do(opts ...googleapi.CallOption) ( // "$ref": "DetectLanguageResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -4134,7 +4791,8 @@ func (c *ProjectsLocationsGetSupportedLanguagesCall) Do(opts ...googleapi.CallOp // "$ref": "SupportedLanguages" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -4492,84 +5150,1678 @@ func (c *ProjectsLocationsRomanizeTextCall) Do(opts ...googleapi.CallOption) (*R // "$ref": "RomanizeTextResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } } -// method id "translate.projects.locations.translateDocument": +// method id "translate.projects.locations.translateDocument": + +type ProjectsLocationsTranslateDocumentCall struct { + s *Service + parent string + translatedocumentrequest *TranslateDocumentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TranslateDocument: Translates documents in synchronous mode. +// +// - parent: Location to make a regional call. Format: +// `projects/{project-number-or-id}/locations/{location-id}`. For +// global calls, use +// `projects/{project-number-or-id}/locations/global` or +// `projects/{project-number-or-id}`. Non-global location is required +// for requests using AutoML models or custom glossaries. Models and +// glossaries must be within the same region (have the same +// location-id), otherwise an INVALID_ARGUMENT (400) error is +// returned. +func (r *ProjectsLocationsService) TranslateDocument(parent string, translatedocumentrequest *TranslateDocumentRequest) *ProjectsLocationsTranslateDocumentCall { + c := &ProjectsLocationsTranslateDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.translatedocumentrequest = translatedocumentrequest + 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 *ProjectsLocationsTranslateDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsTranslateDocumentCall { + 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 *ProjectsLocationsTranslateDocumentCall) Context(ctx context.Context) *ProjectsLocationsTranslateDocumentCall { + 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 *ProjectsLocationsTranslateDocumentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTranslateDocumentCall) 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.translatedocumentrequest) + 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, "v3/{+parent}:translateDocument") + 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 "translate.projects.locations.translateDocument" call. +// Exactly one of *TranslateDocumentResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TranslateDocumentResponse.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 *ProjectsLocationsTranslateDocumentCall) Do(opts ...googleapi.CallOption) (*TranslateDocumentResponse, 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 := &TranslateDocumentResponse{ + 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": "Translates documents in synchronous mode.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}:translateDocument", + // "httpMethod": "POST", + // "id": "translate.projects.locations.translateDocument", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+parent}:translateDocument", + // "request": { + // "$ref": "TranslateDocumentRequest" + // }, + // "response": { + // "$ref": "TranslateDocumentResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" + // ] + // } + +} + +// method id "translate.projects.locations.translateText": + +type ProjectsLocationsTranslateTextCall struct { + s *Service + parent string + translatetextrequest *TranslateTextRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TranslateText: Translates input text and returns translated text. +// +// - parent: Project or location to make a call. Must refer to a +// caller's project. Format: `projects/{project-number-or-id}` or +// `projects/{project-number-or-id}/locations/{location-id}`. For +// global calls, use +// `projects/{project-number-or-id}/locations/global` or +// `projects/{project-number-or-id}`. Non-global location is required +// for requests using AutoML models or custom glossaries. Models and +// glossaries must be within the same region (have same location-id), +// otherwise an INVALID_ARGUMENT (400) error is returned. +func (r *ProjectsLocationsService) TranslateText(parent string, translatetextrequest *TranslateTextRequest) *ProjectsLocationsTranslateTextCall { + c := &ProjectsLocationsTranslateTextCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.translatetextrequest = translatetextrequest + 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 *ProjectsLocationsTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsTranslateTextCall { + 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 *ProjectsLocationsTranslateTextCall) Context(ctx context.Context) *ProjectsLocationsTranslateTextCall { + 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 *ProjectsLocationsTranslateTextCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTranslateTextCall) 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.translatetextrequest) + 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, "v3/{+parent}:translateText") + 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 "translate.projects.locations.translateText" call. +// Exactly one of *TranslateTextResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TranslateTextResponse.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 *ProjectsLocationsTranslateTextCall) Do(opts ...googleapi.CallOption) (*TranslateTextResponse, 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 := &TranslateTextResponse{ + 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": "Translates input text and returns translated text.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}:translateText", + // "httpMethod": "POST", + // "id": "translate.projects.locations.translateText", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+parent}:translateText", + // "request": { + // "$ref": "TranslateTextRequest" + // }, + // "response": { + // "$ref": "TranslateTextResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" + // ] + // } + +} + +// method id "translate.projects.locations.adaptiveMtDatasets.create": + +type ProjectsLocationsAdaptiveMtDatasetsCreateCall struct { + s *Service + parent string + adaptivemtdataset *AdaptiveMtDataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an Adaptive MT dataset. +// +// - parent: Name of the parent project. In form of +// `projects/{project-number-or-id}/locations/{location-id}`. +func (r *ProjectsLocationsAdaptiveMtDatasetsService) Create(parent string, adaptivemtdataset *AdaptiveMtDataset) *ProjectsLocationsAdaptiveMtDatasetsCreateCall { + c := &ProjectsLocationsAdaptiveMtDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.adaptivemtdataset = adaptivemtdataset + 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 *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsCreateCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsCreateCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAdaptiveMtDatasetsCreateCall) 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.adaptivemtdataset) + 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, "v3/{+parent}/adaptiveMtDatasets") + 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 "translate.projects.locations.adaptiveMtDatasets.create" call. +// Exactly one of *AdaptiveMtDataset or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AdaptiveMtDataset.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 *ProjectsLocationsAdaptiveMtDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtDataset, 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 := &AdaptiveMtDataset{ + 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 an Adaptive MT dataset.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets", + // "httpMethod": "POST", + // "id": "translate.projects.locations.adaptiveMtDatasets.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Name of the parent project. In form of `projects/{project-number-or-id}/locations/{location-id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+parent}/adaptiveMtDatasets", + // "request": { + // "$ref": "AdaptiveMtDataset" + // }, + // "response": { + // "$ref": "AdaptiveMtDataset" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" + // ] + // } + +} + +// method id "translate.projects.locations.adaptiveMtDatasets.delete": + +type ProjectsLocationsAdaptiveMtDatasetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an Adaptive MT dataset, including all its entries and +// associated metadata. +// +// - name: Name of the dataset. In the form of +// `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtD +// atasets/{adaptive-mt-dataset-id}`. +func (r *ProjectsLocationsAdaptiveMtDatasetsService) Delete(name string) *ProjectsLocationsAdaptiveMtDatasetsDeleteCall { + c := &ProjectsLocationsAdaptiveMtDatasetsDeleteCall{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 *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsDeleteCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsDeleteCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) 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, "v3/{+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 "translate.projects.locations.adaptiveMtDatasets.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsAdaptiveMtDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an Adaptive MT dataset, including all its entries and associated metadata.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}", + // "httpMethod": "DELETE", + // "id": "translate.projects.locations.adaptiveMtDatasets.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the dataset. In the form of `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" + // ] + // } + +} + +// method id "translate.projects.locations.adaptiveMtDatasets.get": + +type ProjectsLocationsAdaptiveMtDatasetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the Adaptive MT dataset. +// +// - name: Name of the dataset. In the form of +// `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtD +// atasets/{adaptive-mt-dataset-id}`. +func (r *ProjectsLocationsAdaptiveMtDatasetsService) Get(name string) *ProjectsLocationsAdaptiveMtDatasetsGetCall { + c := &ProjectsLocationsAdaptiveMtDatasetsGetCall{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 *ProjectsLocationsAdaptiveMtDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsGetCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsGetCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsGetCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAdaptiveMtDatasetsGetCall) 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, "v3/{+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 "translate.projects.locations.adaptiveMtDatasets.get" call. +// Exactly one of *AdaptiveMtDataset or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AdaptiveMtDataset.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 *ProjectsLocationsAdaptiveMtDatasetsGetCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtDataset, 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 := &AdaptiveMtDataset{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the Adaptive MT dataset.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}", + // "httpMethod": "GET", + // "id": "translate.projects.locations.adaptiveMtDatasets.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the dataset. In the form of `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+name}", + // "response": { + // "$ref": "AdaptiveMtDataset" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" + // ] + // } + +} + +// method id "translate.projects.locations.adaptiveMtDatasets.importAdaptiveMtFile": + +type ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall struct { + s *Service + parent string + importadaptivemtfilerequest *ImportAdaptiveMtFileRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ImportAdaptiveMtFile: Imports an AdaptiveMtFile and adds all of its +// sentences into the AdaptiveMtDataset. +// +// - parent: The resource name of the file, in form of +// `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtD +// atasets/{dataset}`. +func (r *ProjectsLocationsAdaptiveMtDatasetsService) ImportAdaptiveMtFile(parent string, importadaptivemtfilerequest *ImportAdaptiveMtFileRequest) *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall { + c := &ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.importadaptivemtfilerequest = importadaptivemtfilerequest + 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 *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) 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.importadaptivemtfilerequest) + 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, "v3/{+parent}:importAdaptiveMtFile") + 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 "translate.projects.locations.adaptiveMtDatasets.importAdaptiveMtFile" call. +// Exactly one of *ImportAdaptiveMtFileResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ImportAdaptiveMtFileResponse.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 *ProjectsLocationsAdaptiveMtDatasetsImportAdaptiveMtFileCall) Do(opts ...googleapi.CallOption) (*ImportAdaptiveMtFileResponse, 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 := &ImportAdaptiveMtFileResponse{ + 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": "Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}:importAdaptiveMtFile", + // "httpMethod": "POST", + // "id": "translate.projects.locations.adaptiveMtDatasets.importAdaptiveMtFile", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+parent}:importAdaptiveMtFile", + // "request": { + // "$ref": "ImportAdaptiveMtFileRequest" + // }, + // "response": { + // "$ref": "ImportAdaptiveMtFileResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" + // ] + // } + +} + +// method id "translate.projects.locations.adaptiveMtDatasets.list": + +type ProjectsLocationsAdaptiveMtDatasetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Adaptive MT datasets for which the caller has read +// permission. +// +// - parent: The resource name of the project from which to list the +// Adaptive MT datasets. +// `projects/{project-number-or-id}/locations/{location-id}`. +func (r *ProjectsLocationsAdaptiveMtDatasetsService) List(parent string) *ProjectsLocationsAdaptiveMtDatasetsListCall { + c := &ProjectsLocationsAdaptiveMtDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression for +// filtering the results of the request. Filter is not supported yet. +func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) Filter(filter string) *ProjectsLocationsAdaptiveMtDatasetsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server may return fewer results than requested. If unspecified, +// the server picks an appropriate default. +func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsAdaptiveMtDatasetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. Typically, +// this is the value of ListAdaptiveMtDatasetsResponse.next_page_token +// returned from the previous call to `ListAdaptiveMtDatasets` method. +// The first page is returned if `page_token`is empty or missing. +func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsAdaptiveMtDatasetsListCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsListCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsListCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsListCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAdaptiveMtDatasetsListCall) 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, "v3/{+parent}/adaptiveMtDatasets") + 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 "translate.projects.locations.adaptiveMtDatasets.list" call. +// Exactly one of *ListAdaptiveMtDatasetsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAdaptiveMtDatasetsResponse.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 *ProjectsLocationsAdaptiveMtDatasetsListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtDatasetsResponse, 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 := &ListAdaptiveMtDatasetsResponse{ + 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 all Adaptive MT datasets for which the caller has read permission.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets", + // "httpMethod": "GET", + // "id": "translate.projects.locations.adaptiveMtDatasets.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. An expression for filtering the results of the request. Filter is not supported yet.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. The server may return fewer results than requested. If unspecified, the server picks an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtDatasetsResponse.next_page_token returned from the previous call to `ListAdaptiveMtDatasets` method. The first page is returned if `page_token`is empty or missing.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the project from which to list the Adaptive MT datasets. `projects/{project-number-or-id}/locations/{location-id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+parent}/adaptiveMtDatasets", + // "response": { + // "$ref": "ListAdaptiveMtDatasetsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" + // ] + // } + +} + +// 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 *ProjectsLocationsAdaptiveMtDatasetsListCall) Pages(ctx context.Context, f func(*ListAdaptiveMtDatasetsResponse) 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 "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.delete": + +type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an AdaptiveMtFile along with its sentences. +// +// - name: The resource name of the file to delete, in form of +// `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtD +// atasets/{dataset}/files/{file}`. +func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService) Delete(name string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall { + c := &ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall{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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) 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, "v3/{+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 "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an AdaptiveMtFile along with its sentences.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles/{adaptiveMtFilesId}", + // "httpMethod": "DELETE", + // "id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the file to delete, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/files/{file}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" + // ] + // } + +} + +// method id "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.get": + +type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets and AdaptiveMtFile +// +// - name: The resource name of the file, in form of +// `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtD +// atasets/{dataset}/files/{file}`. +func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService) Get(name string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall { + c := &ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall{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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) 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, "v3/{+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 "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.get" call. +// Exactly one of *AdaptiveMtFile or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AdaptiveMtFile.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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesGetCall) Do(opts ...googleapi.CallOption) (*AdaptiveMtFile, 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 := &AdaptiveMtFile{ + 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 and AdaptiveMtFile", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles/{adaptiveMtFilesId}", + // "httpMethod": "GET", + // "id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/files/{file}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+name}", + // "response": { + // "$ref": "AdaptiveMtFile" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" + // ] + // } + +} + +// method id "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.list": + +type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset. +// +// - parent: The resource name of the project from which to list the +// Adaptive MT files. +// `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset +// }`. +func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesService) List(parent string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall { + c := &ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) PageSize(pageSize int64) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. Typically, +// this is the value of ListAdaptiveMtFilesResponse.next_page_token +// returned from the previous call to `ListAdaptiveMtFiles` method. The +// first page is returned if `page_token`is empty or missing. +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) PageToken(pageToken string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall { + 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) 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, "v3/{+parent}/adaptiveMtFiles") + 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 "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.list" call. +// Exactly one of *ListAdaptiveMtFilesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListAdaptiveMtFilesResponse.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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtFilesResponse, 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 := &ListAdaptiveMtFilesResponse{ + 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 all AdaptiveMtFiles associated to an AdaptiveMtDataset.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles", + // "httpMethod": "GET", + // "id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. ", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtFilesResponse.next_page_token returned from the previous call to `ListAdaptiveMtFiles` method. The first page is returned if `page_token`is empty or missing.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the project from which to list the Adaptive MT files. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+parent}/adaptiveMtFiles", + // "response": { + // "$ref": "ListAdaptiveMtFilesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" + // ] + // } + +} + +// 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesListCall) Pages(ctx context.Context, f func(*ListAdaptiveMtFilesResponse) 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 "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.adaptiveMtSentences.list": -type ProjectsLocationsTranslateDocumentCall struct { - s *Service - parent string - translatedocumentrequest *TranslateDocumentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TranslateDocument: Translates documents in synchronous mode. +// List: Lists all AdaptiveMtSentences under a given file/dataset. // -// - parent: Location to make a regional call. Format: -// `projects/{project-number-or-id}/locations/{location-id}`. For -// global calls, use -// `projects/{project-number-or-id}/locations/global` or -// `projects/{project-number-or-id}`. Non-global location is required -// for requests using AutoML models or custom glossaries. Models and -// glossaries must be within the same region (have the same -// location-id), otherwise an INVALID_ARGUMENT (400) error is -// returned. -func (r *ProjectsLocationsService) TranslateDocument(parent string, translatedocumentrequest *TranslateDocumentRequest) *ProjectsLocationsTranslateDocumentCall { - c := &ProjectsLocationsTranslateDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the project from which to list the +// Adaptive MT files. The following format lists all sentences under a +// file. +// `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset +// }/adaptiveMtFiles/{file}` The following format lists all sentences +// within a dataset. +// `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset +// }`. +func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesService) List(parent string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall { + c := &ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.translatedocumentrequest = translatedocumentrequest + return c +} + +// PageSize sets the optional parameter "pageSize": +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) PageSize(pageSize int64) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. Typically, +// this is the value of ListAdaptiveMtSentencesRequest.next_page_token +// returned from the previous call to `ListTranslationMemories` method. +// The first page is returned if `page_token` is empty or missing. +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) PageToken(pageToken string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall { + 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 *ProjectsLocationsTranslateDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsTranslateDocumentCall { +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall { 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall { + 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 *ProjectsLocationsTranslateDocumentCall) Context(ctx context.Context) *ProjectsLocationsTranslateDocumentCall { +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall { 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 *ProjectsLocationsTranslateDocumentCall) Header() http.Header { +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsTranslateDocumentCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) 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.translatedocumentrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+parent}:translateDocument") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+parent}/adaptiveMtSentences") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -4580,14 +6832,14 @@ func (c *ProjectsLocationsTranslateDocumentCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "translate.projects.locations.translateDocument" call. -// Exactly one of *TranslateDocumentResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TranslateDocumentResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.adaptiveMtSentences.list" call. +// Exactly one of *ListAdaptiveMtSentencesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAdaptiveMtSentencesResponse.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 *ProjectsLocationsTranslateDocumentCall) Do(opts ...googleapi.CallOption) (*TranslateDocumentResponse, error) { +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtSentencesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4606,7 +6858,7 @@ func (c *ProjectsLocationsTranslateDocumentCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TranslateDocumentResponse{ + ret := &ListAdaptiveMtSentencesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4618,28 +6870,35 @@ func (c *ProjectsLocationsTranslateDocumentCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Translates documents in synchronous mode.", - // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}:translateDocument", - // "httpMethod": "POST", - // "id": "translate.projects.locations.translateDocument", + // "description": "Lists all AdaptiveMtSentences under a given file/dataset.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles/{adaptiveMtFilesId}/adaptiveMtSentences", + // "httpMethod": "GET", + // "id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.adaptiveMtSentences.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtSentencesRequest.next_page_token returned from the previous call to `ListTranslationMemories` method. The first page is returned if `page_token` is empty or missing.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.", + // "description": "Required. The resource name of the project from which to list the Adaptive MT files. The following format lists all sentences under a file. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` The following format lists all sentences within a dataset. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v3/{+parent}:translateDocument", - // "request": { - // "$ref": "TranslateDocumentRequest" - // }, + // "path": "v3/{+parent}/adaptiveMtSentences", // "response": { - // "$ref": "TranslateDocumentResponse" + // "$ref": "ListAdaptiveMtSentencesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -4649,78 +6908,121 @@ func (c *ProjectsLocationsTranslateDocumentCall) Do(opts ...googleapi.CallOption } -// method id "translate.projects.locations.translateText": +// 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtFilesAdaptiveMtSentencesListCall) Pages(ctx context.Context, f func(*ListAdaptiveMtSentencesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsTranslateTextCall struct { - s *Service - parent string - translatetextrequest *TranslateTextRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "translate.projects.locations.adaptiveMtDatasets.adaptiveMtSentences.list": + +type ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TranslateText: Translates input text and returns translated text. +// List: Lists all AdaptiveMtSentences under a given file/dataset. // -// - parent: Project or location to make a call. Must refer to a -// caller's project. Format: `projects/{project-number-or-id}` or -// `projects/{project-number-or-id}/locations/{location-id}`. For -// global calls, use -// `projects/{project-number-or-id}/locations/global` or -// `projects/{project-number-or-id}`. Non-global location is required -// for requests using AutoML models or custom glossaries. Models and -// glossaries must be within the same region (have same location-id), -// otherwise an INVALID_ARGUMENT (400) error is returned. -func (r *ProjectsLocationsService) TranslateText(parent string, translatetextrequest *TranslateTextRequest) *ProjectsLocationsTranslateTextCall { - c := &ProjectsLocationsTranslateTextCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the project from which to list the +// Adaptive MT files. The following format lists all sentences under a +// file. +// `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset +// }/adaptiveMtFiles/{file}` The following format lists all sentences +// within a dataset. +// `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset +// }`. +func (r *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesService) List(parent string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall { + c := &ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.translatetextrequest = translatetextrequest + return c +} + +// PageSize sets the optional parameter "pageSize": +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) PageSize(pageSize int64) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. Typically, +// this is the value of ListAdaptiveMtSentencesRequest.next_page_token +// returned from the previous call to `ListTranslationMemories` method. +// The first page is returned if `page_token` is empty or missing. +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) PageToken(pageToken string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall { + 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 *ProjectsLocationsTranslateTextCall) Fields(s ...googleapi.Field) *ProjectsLocationsTranslateTextCall { +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall { 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall { + 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 *ProjectsLocationsTranslateTextCall) Context(ctx context.Context) *ProjectsLocationsTranslateTextCall { +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Context(ctx context.Context) *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall { 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 *ProjectsLocationsTranslateTextCall) Header() http.Header { +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsTranslateTextCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) 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.translatetextrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+parent}:translateText") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+parent}/adaptiveMtSentences") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -4731,14 +7033,14 @@ func (c *ProjectsLocationsTranslateTextCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "translate.projects.locations.translateText" call. -// Exactly one of *TranslateTextResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TranslateTextResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "translate.projects.locations.adaptiveMtDatasets.adaptiveMtSentences.list" call. +// Exactly one of *ListAdaptiveMtSentencesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListAdaptiveMtSentencesResponse.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 *ProjectsLocationsTranslateTextCall) Do(opts ...googleapi.CallOption) (*TranslateTextResponse, error) { +func (c *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Do(opts ...googleapi.CallOption) (*ListAdaptiveMtSentencesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4757,7 +7059,7 @@ func (c *ProjectsLocationsTranslateTextCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TranslateTextResponse{ + ret := &ListAdaptiveMtSentencesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4769,36 +7071,65 @@ func (c *ProjectsLocationsTranslateTextCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Translates input text and returns translated text.", - // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}:translateText", - // "httpMethod": "POST", - // "id": "translate.projects.locations.translateText", + // "description": "Lists all AdaptiveMtSentences under a given file/dataset.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtSentences", + // "httpMethod": "GET", + // "id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtSentences.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtSentencesRequest.next_page_token returned from the previous call to `ListTranslationMemories` method. The first page is returned if `page_token` is empty or missing.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.", + // "description": "Required. The resource name of the project from which to list the Adaptive MT files. The following format lists all sentences under a file. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` The following format lists all sentences within a dataset. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v3/{+parent}:translateText", - // "request": { - // "$ref": "TranslateTextRequest" - // }, + // "path": "v3/{+parent}/adaptiveMtSentences", // "response": { - // "$ref": "TranslateTextResponse" + // "$ref": "ListAdaptiveMtSentencesResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } } +// 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 *ProjectsLocationsAdaptiveMtDatasetsAdaptiveMtSentencesListCall) Pages(ctx context.Context, f func(*ListAdaptiveMtSentencesResponse) 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 "translate.projects.locations.datasets.create": type ProjectsLocationsDatasetsCreateCall struct { @@ -4935,7 +7266,8 @@ func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) ( // "$ref": "Operation" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -5359,7 +7691,8 @@ func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Da // "$ref": "Dataset" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -5678,7 +8011,8 @@ func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*L // "$ref": "ListDatasetsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -6186,7 +8520,8 @@ func (c *ProjectsLocationsGlossariesDeleteCall) Do(opts ...googleapi.CallOption) // "$ref": "Operation" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -6333,7 +8668,8 @@ func (c *ProjectsLocationsGlossariesGetCall) Do(opts ...googleapi.CallOption) (* // "$ref": "Glossary" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -6536,7 +8872,8 @@ func (c *ProjectsLocationsGlossariesListCall) Do(opts ...googleapi.CallOption) ( // "$ref": "ListGlossariesResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -7140,7 +9477,8 @@ func (c *ProjectsLocationsGlossariesGlossaryEntriesGetCall) Do(opts ...googleapi // "$ref": "GlossaryEntry" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -7316,7 +9654,8 @@ func (c *ProjectsLocationsGlossariesGlossaryEntriesListCall) Do(opts ...googleap // "$ref": "ListGlossaryEntriesResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // } @@ -8092,7 +10431,8 @@ func (c *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*Lis // "$ref": "ListModelsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-translation" // ] // }