diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index e54318ce302..a38cb67220d 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -2492,7 +2492,7 @@ "type": "string" }, "regionsVersion.version": { - "description": "Required. The latest version is 2022/02.", + "description": "Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02.", "location": "query", "type": "string" } @@ -2630,7 +2630,7 @@ "type": "string" }, "regionsVersion.version": { - "description": "Required. The latest version is 2022/02.", + "description": "Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02.", "location": "query", "type": "string" }, @@ -2901,7 +2901,7 @@ "type": "string" }, "regionsVersion.version": { - "description": "Required. The latest version is 2022/02.", + "description": "Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02.", "location": "query", "type": "string" } @@ -3138,7 +3138,7 @@ "type": "string" }, "regionsVersion.version": { - "description": "Required. The latest version is 2022/02.", + "description": "Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02.", "location": "query", "type": "string" }, @@ -4047,7 +4047,7 @@ } } }, - "revision": "20231031", + "revision": "20231107", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Abi": { @@ -6510,11 +6510,11 @@ "type": "object" }, "RegionsVersion": { - "description": "The version of the available regions being used for the specified resource. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353).", + "description": "The version of the available regions being used for the specified resource.", "id": "RegionsVersion", "properties": { "version": { - "description": "Required. The latest version is 2022/02.", + "description": "Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02.", "type": "string" } }, diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index a64d0a3db15..49fbf75f990 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -4830,13 +4830,18 @@ func (s *RegionalTaxRateInfo) MarshalJSON() ([]byte, error) { } // RegionsVersion: The version of the available regions being used for -// the specified resource. A string representing the version of -// available regions being used for the specified resource. Regional -// prices for the resource have to be specified according to the -// information published in this article -// (https://support.google.com/googleplay/android-developer/answer/10532353). +// the specified resource. type RegionsVersion struct { - // Version: Required. The latest version is 2022/02. + // Version: Required. A string representing the version of available + // regions being used for the specified resource. Regional prices for + // the resource have to be specified according to the information + // published in this article + // (https://support.google.com/googleplay/android-developer/answer/10532353). + // Each time the supported locations substantially change, the version + // will be incremented. Using this field will ensure that creating and + // updating the resource with an older region's version and set of + // regional prices and currencies will succeed even though a new version + // is available. The latest version is 2022/02. Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Version") to @@ -17110,7 +17115,16 @@ func (c *MonetizationSubscriptionsCreateCall) ProductId(productId string) *Monet } // RegionsVersionVersion sets the optional parameter -// "regionsVersion.version": Required. The latest version is 2022/02. +// "regionsVersion.version": Required. A string representing the version +// of available regions being used for the specified resource. Regional +// prices for the resource have to be specified according to the +// information published in this article +// (https://support.google.com/googleplay/android-developer/answer/10532353). +// Each time the supported locations substantially change, the version +// will be incremented. Using this field will ensure that creating and +// updating the resource with an older region's version and set of +// regional prices and currencies will succeed even though a new version +// is available. The latest version is 2022/02. func (c *MonetizationSubscriptionsCreateCall) RegionsVersionVersion(regionsVersionVersion string) *MonetizationSubscriptionsCreateCall { c.urlParams_.Set("regionsVersion.version", regionsVersionVersion) return c @@ -17227,7 +17241,7 @@ func (c *MonetizationSubscriptionsCreateCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "regionsVersion.version": { - // "description": "Required. The latest version is 2022/02.", + // "description": "Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02.", // "location": "query", // "type": "string" // } @@ -17758,7 +17772,16 @@ func (r *MonetizationSubscriptionsService) Patch(packageName string, productId s } // RegionsVersionVersion sets the optional parameter -// "regionsVersion.version": Required. The latest version is 2022/02. +// "regionsVersion.version": Required. A string representing the version +// of available regions being used for the specified resource. Regional +// prices for the resource have to be specified according to the +// information published in this article +// (https://support.google.com/googleplay/android-developer/answer/10532353). +// Each time the supported locations substantially change, the version +// will be incremented. Using this field will ensure that creating and +// updating the resource with an older region's version and set of +// regional prices and currencies will succeed even though a new version +// is available. The latest version is 2022/02. func (c *MonetizationSubscriptionsPatchCall) RegionsVersionVersion(regionsVersionVersion string) *MonetizationSubscriptionsPatchCall { c.urlParams_.Set("regionsVersion.version", regionsVersionVersion) return c @@ -17885,7 +17908,7 @@ func (c *MonetizationSubscriptionsPatchCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // }, // "regionsVersion.version": { - // "description": "Required. The latest version is 2022/02.", + // "description": "Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02.", // "location": "query", // "type": "string" // }, @@ -18762,7 +18785,16 @@ func (c *MonetizationSubscriptionsBasePlansOffersCreateCall) OfferId(offerId str } // RegionsVersionVersion sets the optional parameter -// "regionsVersion.version": Required. The latest version is 2022/02. +// "regionsVersion.version": Required. A string representing the version +// of available regions being used for the specified resource. Regional +// prices for the resource have to be specified according to the +// information published in this article +// (https://support.google.com/googleplay/android-developer/answer/10532353). +// Each time the supported locations substantially change, the version +// will be incremented. Using this field will ensure that creating and +// updating the resource with an older region's version and set of +// regional prices and currencies will succeed even though a new version +// is available. The latest version is 2022/02. func (c *MonetizationSubscriptionsBasePlansOffersCreateCall) RegionsVersionVersion(regionsVersionVersion string) *MonetizationSubscriptionsBasePlansOffersCreateCall { c.urlParams_.Set("regionsVersion.version", regionsVersionVersion) return c @@ -18895,7 +18927,7 @@ func (c *MonetizationSubscriptionsBasePlansOffersCreateCall) Do(opts ...googleap // "type": "string" // }, // "regionsVersion.version": { - // "description": "Required. The latest version is 2022/02.", + // "description": "Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02.", // "location": "query", // "type": "string" // } @@ -19664,7 +19696,16 @@ func (r *MonetizationSubscriptionsBasePlansOffersService) Patch(packageName stri } // RegionsVersionVersion sets the optional parameter -// "regionsVersion.version": Required. The latest version is 2022/02. +// "regionsVersion.version": Required. A string representing the version +// of available regions being used for the specified resource. Regional +// prices for the resource have to be specified according to the +// information published in this article +// (https://support.google.com/googleplay/android-developer/answer/10532353). +// Each time the supported locations substantially change, the version +// will be incremented. Using this field will ensure that creating and +// updating the resource with an older region's version and set of +// regional prices and currencies will succeed even though a new version +// is available. The latest version is 2022/02. func (c *MonetizationSubscriptionsBasePlansOffersPatchCall) RegionsVersionVersion(regionsVersionVersion string) *MonetizationSubscriptionsBasePlansOffersPatchCall { c.urlParams_.Set("regionsVersion.version", regionsVersionVersion) return c @@ -19807,7 +19848,7 @@ func (c *MonetizationSubscriptionsBasePlansOffersPatchCall) Do(opts ...googleapi // "type": "string" // }, // "regionsVersion.version": { - // "description": "Required. The latest version is 2022/02.", + // "description": "Required. A string representing the version of available regions being used for the specified resource. Regional prices for the resource have to be specified according to the information published in [this article](https://support.google.com/googleplay/android-developer/answer/10532353). Each time the supported locations substantially change, the version will be incremented. Using this field will ensure that creating and updating the resource with an older region's version and set of regional prices and currencies will succeed even though a new version is available. The latest version is 2022/02.", // "location": "query", // "type": "string" // }, diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index eb07c88e06d..a25d735b779 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -581,7 +581,7 @@ "REPLY_MESSAGE_OR_FAIL" ], "enumDescriptions": [ - "Default. Starts a thread.", + "Default. Starts a new thread. Using this option ignores any thread ID or `thread_key` that's included.", "Creates the message as a reply to the thread specified by thread ID or `thread_key`. If it fails, the message starts a new thread instead.", "Creates the message as a reply to the thread specified by thread ID or `thread_key`. If it fails, a `NOT_FOUND` error is returned instead." ], @@ -602,7 +602,7 @@ }, "threadKey": { "deprecated": true, - "description": "Optional. Deprecated: Use thread.thread_key instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", + "description": "Optional. Deprecated: Use thread.thread_key instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/v1/messages/create#create-message-thread).", "location": "query", "type": "string" } @@ -957,7 +957,7 @@ } } }, - "revision": "20231019", + "revision": "20231105", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -2951,7 +2951,7 @@ "id": "ListMembershipsResponse", "properties": { "memberships": { - "description": "List of memberships in the requested (or first) page.", + "description": "Unordered list. List of memberships in the requested (or first) page.", "items": { "$ref": "Membership" }, @@ -3218,7 +3218,7 @@ }, "thread": { "$ref": "Thread", - "description": "The thread the message belongs to. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread)." + "description": "The thread the message belongs to. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/v1/messages/create#create-message-thread)." }, "threadReply": { "description": "Output only. When `true`, the message is a response in a reply thread. When `false`, the message is visible in the space's top-level conversation as either the first message of a thread or a message with no threaded replies. If the space doesn't support reply in threads, this field is always `false`.", diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index fdc5a51a9d1..1a5711dd0f3 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -3781,7 +3781,8 @@ func (s *KeyValue) MarshalJSON() ([]byte, error) { } type ListMembershipsResponse struct { - // Memberships: List of memberships in the requested (or first) page. + // Memberships: Unordered list. List of memberships in the requested (or + // first) page. Memberships []*Membership `json:"memberships,omitempty"` // NextPageToken: A token that you can send as `pageToken` to retrieve @@ -4204,7 +4205,7 @@ type Message struct { // Thread: The thread the message belongs to. For example usage, see // Start or reply to a message thread - // (https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). + // (https://developers.google.com/chat/api/guides/v1/messages/create#create-message-thread). Thread *Thread `json:"thread,omitempty"` // ThreadReply: Output only. When `true`, the message is a response in a @@ -7571,7 +7572,11 @@ func (c *SpacesMessagesCreateCall) MessageId(messageId string) *SpacesMessagesCr // // Possible values: // -// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a thread. +// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a new thread. +// +// Using this option ignores any thread ID or `thread_key` that's +// included. +// // "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a // // reply to the thread specified by thread ID or `thread_key`. If it @@ -7599,7 +7604,7 @@ func (c *SpacesMessagesCreateCall) RequestId(requestId string) *SpacesMessagesCr // characters. To start or add to a thread, create a message and specify // a `threadKey` or the thread.name. For example usage, see Start or // reply to a message thread -// (https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). +// (https://developers.google.com/chat/api/guides/v1/messages/create#create-message-thread). func (c *SpacesMessagesCreateCall) ThreadKey(threadKey string) *SpacesMessagesCreateCall { c.urlParams_.Set("threadKey", threadKey) return c @@ -7717,7 +7722,7 @@ func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, e // "REPLY_MESSAGE_OR_FAIL" // ], // "enumDescriptions": [ - // "Default. Starts a thread.", + // "Default. Starts a new thread. Using this option ignores any thread ID or `thread_key` that's included.", // "Creates the message as a reply to the thread specified by thread ID or `thread_key`. If it fails, the message starts a new thread instead.", // "Creates the message as a reply to the thread specified by thread ID or `thread_key`. If it fails, a `NOT_FOUND` error is returned instead." // ], @@ -7738,7 +7743,7 @@ func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, e // }, // "threadKey": { // "deprecated": true, - // "description": "Optional. Deprecated: Use thread.thread_key instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", + // "description": "Optional. Deprecated: Use thread.thread_key instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/v1/messages/create#create-message-thread).", // "location": "query", // "type": "string" // } diff --git a/cloudtasks/v2/cloudtasks-api.json b/cloudtasks/v2/cloudtasks-api.json index afcf79cfdb7..382ea95e966 100644 --- a/cloudtasks/v2/cloudtasks-api.json +++ b/cloudtasks/v2/cloudtasks-api.json @@ -563,6 +563,41 @@ "resources": { "tasks": { "methods": { + "buffer": { + "description": "Creates and buffers a new task without the need to explicitly define a Task message. The queue must have HTTP target. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{taskId}:buffer", + "httpMethod": "POST", + "id": "cloudtasks.projects.locations.queues.tasks.buffer", + "parameterOrder": [ + "queue", + "taskId" + ], + "parameters": { + "queue": { + "description": "Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "required": true, + "type": "string" + }, + "taskId": { + "description": "Optional. Task ID for the task being created. If not provided, Cloud Tasks generates an ID for the task.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v2/{+queue}/tasks/{taskId}:buffer", + "request": { + "$ref": "BufferTaskRequest" + }, + "response": { + "$ref": "BufferTaskResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a task and adds it to a queue. Tasks cannot be updated after creation; there is no UpdateTask command. * The maximum task size is 100KB.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks", @@ -744,7 +779,7 @@ } } }, - "revision": "20231018", + "revision": "20231027", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpRequest": { @@ -869,6 +904,28 @@ }, "type": "object" }, + "BufferTaskRequest": { + "description": "Request message for BufferTask.", + "id": "BufferTaskRequest", + "properties": { + "body": { + "$ref": "HttpBody", + "description": "Optional. Body of the HTTP request. The body can take any generic value. The value is written to the HttpRequest of the [Task]." + } + }, + "type": "object" + }, + "BufferTaskResponse": { + "description": "Response message for BufferTask.", + "id": "BufferTaskResponse", + "properties": { + "task": { + "$ref": "Task", + "description": "The created task." + } + }, + "type": "object" + }, "CmekConfig": { "description": "Describes the customer-managed encryption key (CMEK) configuration associated with a project and location.", "id": "CmekConfig", @@ -962,6 +1019,59 @@ }, "type": "object" }, + "Header": { + "description": "Defines a header message. A header can have a key and a value.", + "id": "Header", + "properties": { + "key": { + "description": "The Key of the header.", + "type": "string" + }, + "value": { + "description": "The Value of the header.", + "type": "string" + } + }, + "type": "object" + }, + "HeaderOverride": { + "description": "Wraps the Header object.", + "id": "HeaderOverride", + "properties": { + "header": { + "$ref": "Header", + "description": "header embodying a key and a value." + } + }, + "type": "object" + }, + "HttpBody": { + "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", + "id": "HttpBody", + "properties": { + "contentType": { + "description": "The HTTP Content-Type header value specifying the content type of the body.", + "type": "string" + }, + "data": { + "description": "The HTTP request/response body as raw binary.", + "format": "byte", + "type": "string" + }, + "extensions": { + "description": "Application specific response metadata. Must be set in the first response for streaming APIs.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, "HttpRequest": { "description": "HTTP request. The task will be pushed to the worker as an HTTP request. If the worker or the redirected worker acknowledges the task by returning a successful HTTP response code ([`200` - `299`]), the task will be removed from the queue. If any other HTTP response code is returned or no response is received, the task will be retried according to the following: * User-specified throttling: retry configuration, rate limits, and the queue's state. * System throttling: To prevent the worker from overloading, Cloud Tasks may temporarily reduce the queue's effective rate. User-specified settings will not be changed. System throttling happens because: * Cloud Tasks backs off on all errors. Normally the backoff specified in rate limits will be used. But if the worker returns `429` (Too Many Requests), `503` (Service Unavailable), or the rate of errors is high, Cloud Tasks will use a higher backoff rate. The retry specified in the `Retry-After` HTTP response header is considered. * To prevent traffic spikes and to smooth sudden increases in traffic, dispatches ramp up slowly when the queue is newly created or idle and if large numbers of tasks suddenly become available to dispatch (due to spikes in create task rates, the queue being unpaused, or many tasks that are scheduled at the same time).", "id": "HttpRequest", @@ -1017,6 +1127,56 @@ }, "type": "object" }, + "HttpTarget": { + "description": "HTTP target. When specified as a Queue, all the tasks with [HttpRequest] will be overridden according to the target.", + "id": "HttpTarget", + "properties": { + "headerOverrides": { + "description": "HTTP target headers. This map contains the header field names and values. Headers will be set when running the CreateTask and/or BufferTask. These headers represent a subset of the headers that will be configured for the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Several predefined headers, prefixed with \"X-CloudTasks-\", can be used to define properties of the task. * Host: This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the task is created. For example,`Content-Type` can be set to `\"application/octet-stream\"` or `\"application/json\"`. The default value is set to \"application/json\"`. * User-Agent: This will be set to `\"Google-Cloud-Tasks\"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.", + "items": { + "$ref": "HeaderOverride" + }, + "type": "array" + }, + "httpMethod": { + "description": "The HTTP method to use for the request. When specified, it overrides HttpRequest for the task. Note that if the value is set to HttpMethod the HttpRequest of the task will be ignored at execution time.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE", + "PATCH", + "OPTIONS" + ], + "enumDescriptions": [ + "HTTP method unspecified", + "HTTP POST", + "HTTP GET", + "HTTP HEAD", + "HTTP PUT", + "HTTP DELETE", + "HTTP PATCH", + "HTTP OPTIONS" + ], + "type": "string" + }, + "oauthToken": { + "$ref": "OAuthToken", + "description": "If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as the `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com." + }, + "oidcToken": { + "$ref": "OidcToken", + "description": "If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself." + }, + "uriOverride": { + "$ref": "UriOverride", + "description": "URI override. When specified, overrides the execution URI for all the tasks in the queue." + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -1135,6 +1295,17 @@ }, "type": "object" }, + "PathOverride": { + "description": "PathOverride. Path message defines path override for HTTP targets.", + "id": "PathOverride", + "properties": { + "path": { + "description": "The URI path (e.g., /users/1234). Default is an empty string.", + "type": "string" + } + }, + "type": "object" + }, "PauseQueueRequest": { "description": "Request message for PauseQueue.", "id": "PauseQueueRequest", @@ -1171,6 +1342,17 @@ "properties": {}, "type": "object" }, + "QueryOverride": { + "description": "QueryOverride. Query message defines query override for HTTP targets.", + "id": "QueryOverride", + "properties": { + "queryParams": { + "description": "The query parameters (e.g., qparam1=123\u0026qparam2=456). Default is an empty string.", + "type": "string" + } + }, + "type": "object" + }, "Queue": { "description": "A queue is a container of related tasks. Queues are configured to manage how those tasks are dispatched. Configurable properties include rate limits, retry options, queue types, and others.", "id": "Queue", @@ -1179,6 +1361,10 @@ "$ref": "AppEngineRouting", "description": "Overrides for task-level app_engine_routing. These settings apply only to App Engine tasks in this queue. Http tasks are not affected. If set, `app_engine_routing_override` is used for all App Engine tasks in the queue, no matter what the setting is for the task-level app_engine_routing." }, + "httpTarget": { + "$ref": "HttpTarget", + "description": "Modifies HTTP target for HTTP tasks." + }, "name": { "description": "Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters.", "type": "string" @@ -1443,6 +1629,58 @@ } }, "type": "object" + }, + "UriOverride": { + "description": "URI Override. When specified, all the HTTP tasks inside the queue will be partially or fully overridden depending on the configured values.", + "id": "UriOverride", + "properties": { + "host": { + "description": "Host override. When specified, replaces the host part of the task URL. For example, if the task URL is \"https://www.google.com,\" and host value is set to \"example.net\", the overridden URI will be changed to \"https://example.net.\" Host value cannot be an empty string (INVALID_ARGUMENT).", + "type": "string" + }, + "pathOverride": { + "$ref": "PathOverride", + "description": "URI path. When specified, replaces the existing path of the task URL. Setting the path value to an empty string clears the URI path segment." + }, + "port": { + "description": "Port override. When specified, replaces the port part of the task URI. For instance, for a URI http://www.google.com/foo and port=123, the overridden URI becomes http://www.google.com:123/foo. Note that the port value must be a positive integer. Setting the port to 0 (Zero) clears the URI port.", + "format": "int64", + "type": "string" + }, + "queryOverride": { + "$ref": "QueryOverride", + "description": "URI query. When specified, replaces the query part of the task URI. Setting the query value to an empty string clears the URI query segment." + }, + "scheme": { + "description": "Scheme override. When specified, the task URI scheme is replaced by the provided value (HTTP or HTTPS).", + "enum": [ + "SCHEME_UNSPECIFIED", + "HTTP", + "HTTPS" + ], + "enumDescriptions": [ + "Scheme unspecified. Defaults to HTTPS.", + "Convert the scheme to HTTP, e.g., https://www.google.ca will change to http://www.google.ca.", + "Convert the scheme to HTTPS, e.g., http://www.google.ca will change to https://www.google.ca." + ], + "type": "string" + }, + "uriOverrideEnforceMode": { + "description": "URI Override Enforce Mode When specified, determines the Target UriOverride mode. If not specified, it defaults to ALWAYS.", + "enum": [ + "URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED", + "IF_NOT_EXISTS", + "ALWAYS" + ], + "enumDescriptions": [ + "UriOverrideEnforceMode Unspecified. Defaults to ALWAYS.", + "In the IF_NOT_EXISTS mode, queue-level configuration is only applied where task-level configuration does not exist.", + "In the ALWAYS mode, queue-level configuration overrides all task-level configuration" + ], + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/cloudtasks/v2/cloudtasks-gen.go b/cloudtasks/v2/cloudtasks-gen.go index e96c47f1eae..4fb46176d24 100644 --- a/cloudtasks/v2/cloudtasks-gen.go +++ b/cloudtasks/v2/cloudtasks-gen.go @@ -530,6 +530,67 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BufferTaskRequest: Request message for BufferTask. +type BufferTaskRequest struct { + // Body: Optional. Body of the HTTP request. The body can take any + // generic value. The value is written to the HttpRequest of the [Task]. + Body *HttpBody `json:"body,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Body") 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. "Body") 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 *BufferTaskRequest) MarshalJSON() ([]byte, error) { + type NoMethod BufferTaskRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BufferTaskResponse: Response message for BufferTask. +type BufferTaskResponse struct { + // Task: The created task. + Task *Task `json:"task,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Task") 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. "Task") 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 *BufferTaskResponse) MarshalJSON() ([]byte, error) { + type NoMethod BufferTaskResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CmekConfig: Describes the customer-managed encryption key (CMEK) // configuration associated with a project and location. type CmekConfig struct { @@ -784,6 +845,119 @@ func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Header: Defines a header message. A header can have a key and a +// value. +type Header struct { + // Key: The Key of the header. + Key string `json:"key,omitempty"` + + // Value: The Value of the header. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Header) MarshalJSON() ([]byte, error) { + type NoMethod Header + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HeaderOverride: Wraps the Header object. +type HeaderOverride struct { + // Header: header embodying a key and a value. + Header *Header `json:"header,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Header") 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. "Header") 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 *HeaderOverride) MarshalJSON() ([]byte, error) { + type NoMethod HeaderOverride + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpBody: Message that represents an arbitrary HTTP body. It should +// only be used for payload formats that can't be represented as JSON, +// such as raw binary or an HTML page. This message can be used both in +// streaming and non-streaming API methods in the request as well as the +// response. It can be used as a top-level request field, which is +// convenient if one wants to extract parameters from either the URL or +// HTTP template into the request fields and also want access to the raw +// HTTP body. Example: message GetResourceRequest { // A unique request +// id. string request_id = 1; // The raw HTTP body is bound to this +// field. google.api.HttpBody http_body = 2; } service ResourceService { +// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); +// rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); } Example with streaming methods: service +// CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns +// (stream google.api.HttpBody); rpc UpdateCalendar(stream +// google.api.HttpBody) returns (stream google.api.HttpBody); } Use of +// this type only changes how the request and response bodies are +// handled, all other features will continue to work unchanged. +type HttpBody struct { + // ContentType: The HTTP Content-Type header value specifying the + // content type of the body. + ContentType string `json:"contentType,omitempty"` + + // Data: The HTTP request/response body as raw binary. + Data string `json:"data,omitempty"` + + // Extensions: Application specific response metadata. Must be set in + // the first response for streaming APIs. + Extensions []googleapi.RawMessage `json:"extensions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentType") 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. "ContentType") 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 *HttpBody) MarshalJSON() ([]byte, error) { + type NoMethod HttpBody + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HttpRequest: HTTP request. The task will be pushed to the worker as // an HTTP request. If the worker or the redirected worker acknowledges // the task by returning a successful HTTP response code ([`200` - @@ -888,6 +1062,88 @@ func (s *HttpRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HttpTarget: HTTP target. When specified as a Queue, all the tasks +// with [HttpRequest] will be overridden according to the target. +type HttpTarget struct { + // HeaderOverrides: HTTP target headers. This map contains the header + // field names and values. Headers will be set when running the + // CreateTask and/or BufferTask. These headers represent a subset of the + // headers that will be configured for the task's HTTP request. Some + // HTTP request headers will be ignored or replaced. A partial list of + // headers that will be ignored or replaced is: * Several predefined + // headers, prefixed with "X-CloudTasks-", can be used to define + // properties of the task. * Host: This will be computed by Cloud Tasks + // and derived from HttpRequest.url. * Content-Length: This will be + // computed by Cloud Tasks. `Content-Type` won't be set by Cloud Tasks. + // You can explicitly set `Content-Type` to a media type when the task + // is created. For example,`Content-Type` can be set to + // "application/octet-stream" or "application/json". The default + // value is set to "application/json". * User-Agent: This will be set + // to "Google-Cloud-Tasks". Headers which can have multiple values + // (according to RFC2616) can be specified using comma-separated values. + // The size of the headers must be less than 80KB. Queue-level headers + // to override headers of all the tasks in the queue. + HeaderOverrides []*HeaderOverride `json:"headerOverrides,omitempty"` + + // HttpMethod: The HTTP method to use for the request. When specified, + // it overrides HttpRequest for the task. Note that if the value is set + // to HttpMethod the HttpRequest of the task will be ignored at + // execution time. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method unspecified + // "POST" - HTTP POST + // "GET" - HTTP GET + // "HEAD" - HTTP HEAD + // "PUT" - HTTP PUT + // "DELETE" - HTTP DELETE + // "PATCH" - HTTP PATCH + // "OPTIONS" - HTTP OPTIONS + HttpMethod string `json:"httpMethod,omitempty"` + + // OauthToken: If specified, an OAuth token + // (https://developers.google.com/identity/protocols/OAuth2) will be + // generated and attached as the `Authorization` header in the HTTP + // request. This type of authorization should generally only be used + // when calling Google APIs hosted on *.googleapis.com. + OauthToken *OAuthToken `json:"oauthToken,omitempty"` + + // OidcToken: If specified, an OIDC + // (https://developers.google.com/identity/protocols/OpenIDConnect) + // token will be generated and attached as an `Authorization` header in + // the HTTP request. This type of authorization can be used for many + // scenarios, including calling Cloud Run, or endpoints where you intend + // to validate the token yourself. + OidcToken *OidcToken `json:"oidcToken,omitempty"` + + // UriOverride: URI override. When specified, overrides the execution + // URI for all the tasks in the queue. + UriOverride *UriOverride `json:"uriOverride,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HeaderOverrides") 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. "HeaderOverrides") 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 *HttpTarget) MarshalJSON() ([]byte, error) { + type NoMethod HttpTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for // Locations.ListLocations. type ListLocationsResponse struct { @@ -1133,6 +1389,35 @@ func (s *OidcToken) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PathOverride: PathOverride. Path message defines path override for +// HTTP targets. +type PathOverride struct { + // Path: The URI path (e.g., /users/1234). Default is an empty string. + Path string `json:"path,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Path") 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. "Path") 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 *PathOverride) MarshalJSON() ([]byte, error) { + type NoMethod PathOverride + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PauseQueueRequest: Request message for PauseQueue. type PauseQueueRequest struct { } @@ -1247,6 +1532,36 @@ func (s *Policy) MarshalJSON() ([]byte, error) { type PurgeQueueRequest struct { } +// QueryOverride: QueryOverride. Query message defines query override +// for HTTP targets. +type QueryOverride struct { + // QueryParams: The query parameters (e.g., qparam1=123&qparam2=456). + // Default is an empty string. + QueryParams string `json:"queryParams,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QueryParams") 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. "QueryParams") 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 *QueryOverride) MarshalJSON() ([]byte, error) { + type NoMethod QueryOverride + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Queue: A queue is a container of related tasks. Queues are configured // to manage how those tasks are dispatched. Configurable properties // include rate limits, retry options, queue types, and others. @@ -1259,6 +1574,9 @@ type Queue struct { // app_engine_routing. AppEngineRoutingOverride *AppEngineRouting `json:"appEngineRoutingOverride,omitempty"` + // HttpTarget: Modifies HTTP target for HTTP tasks. + HttpTarget *HttpTarget `json:"httpTarget,omitempty"` + // Name: Caller-specified and required in CreateQueue, after which it // becomes output only. The queue name. The queue name must have the // following format: @@ -1911,6 +2229,82 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UriOverride: URI Override. When specified, all the HTTP tasks inside +// the queue will be partially or fully overridden depending on the +// configured values. +type UriOverride struct { + // Host: Host override. When specified, replaces the host part of the + // task URL. For example, if the task URL is "https://www.google.com," + // and host value is set to "example.net", the overridden URI will be + // changed to "https://example.net." Host value cannot be an empty + // string (INVALID_ARGUMENT). + Host string `json:"host,omitempty"` + + // PathOverride: URI path. When specified, replaces the existing path of + // the task URL. Setting the path value to an empty string clears the + // URI path segment. + PathOverride *PathOverride `json:"pathOverride,omitempty"` + + // Port: Port override. When specified, replaces the port part of the + // task URI. For instance, for a URI http://www.google.com/foo and + // port=123, the overridden URI becomes http://www.google.com:123/foo. + // Note that the port value must be a positive integer. Setting the port + // to 0 (Zero) clears the URI port. + Port int64 `json:"port,omitempty,string"` + + // QueryOverride: URI query. When specified, replaces the query part of + // the task URI. Setting the query value to an empty string clears the + // URI query segment. + QueryOverride *QueryOverride `json:"queryOverride,omitempty"` + + // Scheme: Scheme override. When specified, the task URI scheme is + // replaced by the provided value (HTTP or HTTPS). + // + // Possible values: + // "SCHEME_UNSPECIFIED" - Scheme unspecified. Defaults to HTTPS. + // "HTTP" - Convert the scheme to HTTP, e.g., https://www.google.ca + // will change to http://www.google.ca. + // "HTTPS" - Convert the scheme to HTTPS, e.g., http://www.google.ca + // will change to https://www.google.ca. + Scheme string `json:"scheme,omitempty"` + + // UriOverrideEnforceMode: URI Override Enforce Mode When specified, + // determines the Target UriOverride mode. If not specified, it defaults + // to ALWAYS. + // + // Possible values: + // "URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED" - UriOverrideEnforceMode + // Unspecified. Defaults to ALWAYS. + // "IF_NOT_EXISTS" - In the IF_NOT_EXISTS mode, queue-level + // configuration is only applied where task-level configuration does not + // exist. + // "ALWAYS" - In the ALWAYS mode, queue-level configuration overrides + // all task-level configuration + UriOverrideEnforceMode string `json:"uriOverrideEnforceMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Host") 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. "Host") 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 *UriOverride) MarshalJSON() ([]byte, error) { + type NoMethod UriOverride + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "cloudtasks.projects.locations.get": type ProjectsLocationsGetCall struct { @@ -4308,6 +4702,170 @@ func (c *ProjectsLocationsQueuesTestIamPermissionsCall) Do(opts ...googleapi.Cal } +// method id "cloudtasks.projects.locations.queues.tasks.buffer": + +type ProjectsLocationsQueuesTasksBufferCall struct { + s *Service + queue string + taskId string + buffertaskrequest *BufferTaskRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Buffer: Creates and buffers a new task without the need to explicitly +// define a Task message. The queue must have HTTP target. To create the +// task with a custom ID, use the following format and set TASK_ID to +// your desired ID: +// projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_I +// D:buffer To create the task with an automatically generated ID, use +// the following format: +// projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer +// . +// +// - queue: The parent queue name. For example: +// projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The +// queue must already exist. +// - taskId: Optional. Task ID for the task being created. If not +// provided, Cloud Tasks generates an ID for the task. +func (r *ProjectsLocationsQueuesTasksService) Buffer(queue string, taskId string, buffertaskrequest *BufferTaskRequest) *ProjectsLocationsQueuesTasksBufferCall { + c := &ProjectsLocationsQueuesTasksBufferCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.queue = queue + c.taskId = taskId + c.buffertaskrequest = buffertaskrequest + 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 *ProjectsLocationsQueuesTasksBufferCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksBufferCall { + 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 *ProjectsLocationsQueuesTasksBufferCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksBufferCall { + 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 *ProjectsLocationsQueuesTasksBufferCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesTasksBufferCall) 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.buffertaskrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+queue}/tasks/{taskId}:buffer") + 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{ + "queue": c.queue, + "taskId": c.taskId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.queues.tasks.buffer" call. +// Exactly one of *BufferTaskResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *BufferTaskResponse.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 *ProjectsLocationsQueuesTasksBufferCall) Do(opts ...googleapi.CallOption) (*BufferTaskResponse, 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 := &BufferTaskResponse{ + 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 and buffers a new task without the need to explicitly define a Task message. The queue must have HTTP target. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{taskId}:buffer", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.tasks.buffer", + // "parameterOrder": [ + // "queue", + // "taskId" + // ], + // "parameters": { + // "queue": { + // "description": "Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "taskId": { + // "description": "Optional. Task ID for the task being created. If not provided, Cloud Tasks generates an ID for the task.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+queue}/tasks/{taskId}:buffer", + // "request": { + // "$ref": "BufferTaskRequest" + // }, + // "response": { + // "$ref": "BufferTaskResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "cloudtasks.projects.locations.queues.tasks.create": type ProjectsLocationsQueuesTasksCreateCall struct { diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 4913c0f596d..2411236d405 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -35267,7 +35267,7 @@ } } }, - "revision": "20231024", + "revision": "20231031", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -43565,7 +43565,7 @@ "type": "string" }, "allPorts": { - "description": "This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal and external protocol forwarding. Set this field to true to allow packets addressed to any port or packets lacking destination port information (for example, UDP fragments after the first fragment) to be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive.", + "description": "The ports, portRange, and allPorts fields are mutually exclusive. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The allPorts field has the following limitations: - It requires that the forwarding rule IPProtocol be TCP, UDP, SCTP, or L3_DEFAULT. - It's applicable only to the following products: internal passthrough Network Load Balancers, backend service-based external passthrough Network Load Balancers, and internal and external protocol forwarding. - Set this field to true to allow packets addressed to any port or packets lacking destination port information (for example, UDP fragments after the first fragment) to be forwarded to the backends configured with this forwarding rule. The L3_DEFAULT protocol requires allPorts be set to true. ", "type": "boolean" }, "allowGlobalAccess": { @@ -43694,11 +43694,11 @@ "type": "boolean" }, "portRange": { - "description": "This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By backend service-based network load balancers, target pool-based network load balancers, internal proxy load balancers, external proxy load balancers, Traffic Director, external protocol forwarding, and Classic VPN. Some products have restrictions on what ports can be used. See port specifications for details. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The ports, port_range, and allPorts fields are mutually exclusive. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. @pattern: \\\\d+(?:-\\\\d+)?", + "description": "The ports, portRange, and allPorts fields are mutually exclusive. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The portRange field has the following limitations: - It requires that the forwarding rule IPProtocol be TCP, UDP, or SCTP, and - It's applicable only to the following products: external passthrough Network Load Balancers, internal and external proxy Network Load Balancers, internal and external Application Load Balancers, external protocol forwarding, and Classic VPN. - Some products have restrictions on what ports can be used. See port specifications for details. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. @pattern: \\\\d+(?:-\\\\d+)?", "type": "string" }, "ports": { - "description": "This field can only be used: - If IPProtocol is one of TCP, UDP, or SCTP. - By internal TCP/UDP load balancers, backend service-based network load balancers, and internal protocol forwarding. You can specify a list of up to five ports by number, separated by commas. The ports can be contiguous or discontiguous. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair, and cannot share any values defined in ports. The ports, port_range, and allPorts fields are mutually exclusive. @pattern: \\\\d+(?:-\\\\d+)?", + "description": "The ports, portRange, and allPorts fields are mutually exclusive. Only packets addressed to ports in the specified range will be forwarded to the backends configured with this forwarding rule. The ports field has the following limitations: - It requires that the forwarding rule IPProtocol be TCP, UDP, or SCTP, and - It's applicable only to the following products: internal passthrough Network Load Balancers, backend service-based external passthrough Network Load Balancers, and internal protocol forwarding. - You can specify a list of up to five ports by number, separated by commas. The ports can be contiguous or discontiguous. For external forwarding rules, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair if they share at least one port number. For internal forwarding rules within the same VPC network, two or more forwarding rules cannot use the same [IPAddress, IPProtocol] pair if they share at least one port number. @pattern: \\\\d+(?:-\\\\d+)?", "items": { "type": "string" }, @@ -65320,6 +65320,9 @@ "physicalHost": { "description": "[Output Only] An opaque ID of the host on which the VM is running.", "type": "string" + }, + "upcomingMaintenance": { + "$ref": "UpcomingMaintenance" } }, "type": "object" @@ -66639,6 +66642,18 @@ "format": "int32", "type": "integer" }, + "type": { + "description": "Indicates whether this NAT is used for public or private IP translation. If unspecified, it defaults to PUBLIC.", + "enum": [ + "PRIVATE", + "PUBLIC" + ], + "enumDescriptions": [ + "NAT used for private IP translation.", + "NAT used for public IP translation. This is the default." + ], + "type": "string" + }, "udpIdleTimeoutSec": { "description": "Timeout (in seconds) for UDP connections. Defaults to 30s if not set.", "format": "int32", @@ -66705,12 +66720,26 @@ }, "type": "array" }, + "sourceNatActiveRanges": { + "description": "A list of URLs of the subnetworks used as source ranges for this NAT Rule. These subnetworks must have purpose set to PRIVATE_NAT. This field is used for private NAT.", + "items": { + "type": "string" + }, + "type": "array" + }, "sourceNatDrainIps": { "description": "A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT rule only. This field is used for public NAT.", "items": { "type": "string" }, "type": "array" + }, + "sourceNatDrainRanges": { + "description": "A list of URLs of subnetworks representing source ranges to be drained. This is only supported on patch/update, and these subnetworks must have previously been used as active ranges in this NAT Rule. This field is used for private NAT.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -68051,9 +68080,11 @@ "jsonParsing": { "enum": [ "DISABLED", - "STANDARD" + "STANDARD", + "STANDARD_WITH_GRAPHQL" ], "enumDescriptions": [ + "", "", "" ], @@ -68069,6 +68100,13 @@ "" ], "type": "string" + }, + "userIpRequestHeaders": { + "description": "An optional list of case-insensitive request header names to use for resolving the callers client IP address.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -69661,6 +69699,13 @@ "format": "int64", "type": "string" }, + "guestOsFeatures": { + "description": "[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.", + "items": { + "$ref": "GuestOsFeature" + }, + "type": "array" + }, "id": { "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64", @@ -71602,6 +71647,7 @@ "GLOBAL_MANAGED_PROXY", "INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE", + "PRIVATE_NAT", "PRIVATE_RFC_1918", "PRIVATE_SERVICE_CONNECT", "REGIONAL_MANAGED_PROXY" @@ -71610,6 +71656,7 @@ "Subnet reserved for Global Envoy-based Load Balancing.", "Subnet reserved for Internal HTTP(S) Load Balancing.", "Regular user created or automatically created subnet.", + "Subnetwork used as source range for Private NAT Gateways.", "Regular user created or automatically created subnet.", "Subnetworks created for Private Service Connect in the producer network.", "Subnetwork used for Regional Envoy-based Load Balancing." @@ -76007,6 +76054,56 @@ }, "type": "object" }, + "UpcomingMaintenance": { + "description": "Upcoming Maintenance notification information.", + "id": "UpcomingMaintenance", + "properties": { + "canReschedule": { + "description": "Indicates if the maintenance can be customer triggered.", + "type": "boolean" + }, + "latestWindowStartTime": { + "description": "The latest time for the planned maintenance window to start. This timestamp value is in RFC3339 text format.", + "type": "string" + }, + "maintenanceStatus": { + "enum": [ + "ONGOING", + "PENDING", + "UNKNOWN" + ], + "enumDescriptions": [ + "There is ongoing maintenance on this VM.", + "There is pending maintenance.", + "Unknown maintenance status. Do not use this value." + ], + "type": "string" + }, + "type": { + "description": "Defines the type of maintenance.", + "enum": [ + "SCHEDULED", + "UNKNOWN_TYPE", + "UNSCHEDULED" + ], + "enumDescriptions": [ + "Scheduled maintenance (e.g. maintenance after uptime guarantee is complete).", + "No type specified. Do not use this value.", + "Unscheduled maintenance (e.g. emergency maintenance during uptime guarantee)." + ], + "type": "string" + }, + "windowEndTime": { + "description": "The time by which the maintenance disruption will be completed. This timestamp value is in RFC3339 text format.", + "type": "string" + }, + "windowStartTime": { + "description": "The current start time of the maintenance window. This timestamp value is in RFC3339 text format.", + "type": "string" + } + }, + "type": "object" + }, "UrlMap": { "description": "Represents a URL Map resource. Compute Engine has two URL Map resources: * [Global](/compute/docs/reference/rest/v1/urlMaps) * [Regional](/compute/docs/reference/rest/v1/regionUrlMaps) A URL map resource is a component of certain types of cloud load balancers and Traffic Director: * urlMaps are used by global external Application Load Balancers, classic Application Load Balancers, and cross-region internal Application Load Balancers. * regionUrlMaps are used by internal Application Load Balancers, regional external Application Load Balancers and regional internal Application Load Balancers. For a list of supported URL map features by the load balancer type, see the Load balancing features: Routing and traffic management table. For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table. This resource defines mappings from hostnames and URL paths to either a backend service or a backend bucket. To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.", "id": "UrlMap", @@ -76715,6 +76812,7 @@ "GLOBAL_MANAGED_PROXY", "INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE", + "PRIVATE_NAT", "PRIVATE_RFC_1918", "PRIVATE_SERVICE_CONNECT", "REGIONAL_MANAGED_PROXY" @@ -76723,6 +76821,7 @@ "Subnet reserved for Global Envoy-based Load Balancing.", "Subnet reserved for Internal HTTP(S) Load Balancing.", "Regular user created or automatically created subnet.", + "Subnetwork used as source range for Private NAT Gateways.", "Regular user created or automatically created subnet.", "Subnetworks created for Private Service Connect in the producer network.", "Subnetwork used for Regional Envoy-based Load Balancing." diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index 06d94490af0..2f9af3b44f8 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -13366,14 +13366,19 @@ type ForwardingRule struct { // "UDP" IPProtocol string `json:"IPProtocol,omitempty"` - // AllPorts: This field can only be used: - If IPProtocol is one of TCP, - // UDP, or SCTP. - By internal TCP/UDP load balancers, backend - // service-based network load balancers, and internal and external - // protocol forwarding. Set this field to true to allow packets + // AllPorts: The ports, portRange, and allPorts fields are mutually + // exclusive. Only packets addressed to ports in the specified range + // will be forwarded to the backends configured with this forwarding + // rule. The allPorts field has the following limitations: - It requires + // that the forwarding rule IPProtocol be TCP, UDP, SCTP, or L3_DEFAULT. + // - It's applicable only to the following products: internal + // passthrough Network Load Balancers, backend service-based external + // passthrough Network Load Balancers, and internal and external + // protocol forwarding. - Set this field to true to allow packets // addressed to any port or packets lacking destination port information // (for example, UDP fragments after the first fragment) to be forwarded - // to the backends configured with this forwarding rule. The ports, - // port_range, and allPorts fields are mutually exclusive. + // to the backends configured with this forwarding rule. The L3_DEFAULT + // protocol requires allPorts be set to true. AllPorts bool `json:"allPorts,omitempty"` // AllowGlobalAccess: This field is used along with the backend_service @@ -13540,37 +13545,39 @@ type ForwardingRule struct { // is not mutable. NoAutomateDnsZone bool `json:"noAutomateDnsZone,omitempty"` - // PortRange: This field can only be used: - If IPProtocol is one of - // TCP, UDP, or SCTP. - By backend service-based network load balancers, - // target pool-based network load balancers, internal proxy load - // balancers, external proxy load balancers, Traffic Director, external - // protocol forwarding, and Classic VPN. Some products have restrictions - // on what ports can be used. See port specifications for details. Only - // packets addressed to ports in the specified range will be forwarded - // to the backends configured with this forwarding rule. The ports, - // port_range, and allPorts fields are mutually exclusive. For external - // forwarding rules, two or more forwarding rules cannot use the same - // [IPAddress, IPProtocol] pair, and cannot have overlapping portRanges. - // For internal forwarding rules within the same VPC network, two or + // PortRange: The ports, portRange, and allPorts fields are mutually + // exclusive. Only packets addressed to ports in the specified range + // will be forwarded to the backends configured with this forwarding + // rule. The portRange field has the following limitations: - It + // requires that the forwarding rule IPProtocol be TCP, UDP, or SCTP, + // and - It's applicable only to the following products: external + // passthrough Network Load Balancers, internal and external proxy + // Network Load Balancers, internal and external Application Load + // Balancers, external protocol forwarding, and Classic VPN. - Some + // products have restrictions on what ports can be used. See port + // specifications for details. For external forwarding rules, two or // more forwarding rules cannot use the same [IPAddress, IPProtocol] - // pair, and cannot have overlapping portRanges. @pattern: - // \\d+(?:-\\d+)? + // pair, and cannot have overlapping portRanges. For internal forwarding + // rules within the same VPC network, two or more forwarding rules + // cannot use the same [IPAddress, IPProtocol] pair, and cannot have + // overlapping portRanges. @pattern: \\d+(?:-\\d+)? PortRange string `json:"portRange,omitempty"` - // Ports: This field can only be used: - If IPProtocol is one of TCP, - // UDP, or SCTP. - By internal TCP/UDP load balancers, backend - // service-based network load balancers, and internal protocol - // forwarding. You can specify a list of up to five ports by number, - // separated by commas. The ports can be contiguous or discontiguous. - // Only packets addressed to these ports will be forwarded to the - // backends configured with this forwarding rule. For external - // forwarding rules, two or more forwarding rules cannot use the same - // [IPAddress, IPProtocol] pair, and cannot share any values defined in - // ports. For internal forwarding rules within the same VPC network, two - // or more forwarding rules cannot use the same [IPAddress, IPProtocol] - // pair, and cannot share any values defined in ports. The ports, - // port_range, and allPorts fields are mutually exclusive. @pattern: - // \\d+(?:-\\d+)? + // Ports: The ports, portRange, and allPorts fields are mutually + // exclusive. Only packets addressed to ports in the specified range + // will be forwarded to the backends configured with this forwarding + // rule. The ports field has the following limitations: - It requires + // that the forwarding rule IPProtocol be TCP, UDP, or SCTP, and - It's + // applicable only to the following products: internal passthrough + // Network Load Balancers, backend service-based external passthrough + // Network Load Balancers, and internal protocol forwarding. - You can + // specify a list of up to five ports by number, separated by commas. + // The ports can be contiguous or discontiguous. For external forwarding + // rules, two or more forwarding rules cannot use the same [IPAddress, + // IPProtocol] pair if they share at least one port number. For internal + // forwarding rules within the same VPC network, two or more forwarding + // rules cannot use the same [IPAddress, IPProtocol] pair if they share + // at least one port number. @pattern: \\d+(?:-\\d+)? Ports []string `json:"ports,omitempty"` // PscConnectionId: [Output Only] The PSC connection id of the PSC @@ -43855,6 +43862,8 @@ type ResourceStatus struct { // is running. PhysicalHost string `json:"physicalHost,omitempty"` + UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` + // ForceSendFields is a list of field names (e.g. "PhysicalHost") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -45501,6 +45510,14 @@ type RouterNat struct { // connections. Defaults to 30s if not set. TcpTransitoryIdleTimeoutSec int64 `json:"tcpTransitoryIdleTimeoutSec,omitempty"` + // Type: Indicates whether this NAT is used for public or private IP + // translation. If unspecified, it defaults to PUBLIC. + // + // Possible values: + // "PRIVATE" - NAT used for private IP translation. + // "PUBLIC" - NAT used for public IP translation. This is the default. + Type string `json:"type,omitempty"` + // UdpIdleTimeoutSec: Timeout (in seconds) for UDP connections. Defaults // to 30s if not set. UdpIdleTimeoutSec int64 `json:"udpIdleTimeoutSec,omitempty"` @@ -45625,12 +45642,23 @@ type RouterNatRuleAction struct { // addresses assigned to the project. This field is used for public NAT. SourceNatActiveIps []string `json:"sourceNatActiveIps,omitempty"` + // SourceNatActiveRanges: A list of URLs of the subnetworks used as + // source ranges for this NAT Rule. These subnetworks must have purpose + // set to PRIVATE_NAT. This field is used for private NAT. + SourceNatActiveRanges []string `json:"sourceNatActiveRanges,omitempty"` + // SourceNatDrainIps: A list of URLs of the IP resources to be drained. // These IPs must be valid static external IPs that have been assigned // to the NAT. These IPs should be used for updating/patching a NAT rule // only. This field is used for public NAT. SourceNatDrainIps []string `json:"sourceNatDrainIps,omitempty"` + // SourceNatDrainRanges: A list of URLs of subnetworks representing + // source ranges to be drained. This is only supported on patch/update, + // and these subnetworks must have previously been used as active ranges + // in this NAT Rule. This field is used for private NAT. + SourceNatDrainRanges []string `json:"sourceNatDrainRanges,omitempty"` + // ForceSendFields is a list of field names (e.g. "SourceNatActiveIps") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -47411,6 +47439,7 @@ type SecurityPolicyAdvancedOptionsConfig struct { // Possible values: // "DISABLED" // "STANDARD" + // "STANDARD_WITH_GRAPHQL" JsonParsing string `json:"jsonParsing,omitempty"` // Possible values: @@ -47418,6 +47447,10 @@ type SecurityPolicyAdvancedOptionsConfig struct { // "VERBOSE" LogLevel string `json:"logLevel,omitempty"` + // UserIpRequestHeaders: An optional list of case-insensitive request + // header names to use for resolving the callers client IP address. + UserIpRequestHeaders []string `json:"userIpRequestHeaders,omitempty"` + // ForceSendFields is a list of field names (e.g. "JsonCustomConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -49851,6 +49884,12 @@ type Snapshot struct { // snapshot to a disk. DownloadBytes int64 `json:"downloadBytes,omitempty,string"` + // GuestOsFeatures: [Output Only] A list of features to enable on the + // guest operating system. Applicable only for bootable images. Read + // Enabling guest operating system features to see a list of available + // options. + GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` @@ -52431,6 +52470,8 @@ type Subnetwork struct { // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal // HTTP(S) Load Balancing. // "PRIVATE" - Regular user created or automatically created subnet. + // "PRIVATE_NAT" - Subnetwork used as source range for Private NAT + // Gateways. // "PRIVATE_RFC_1918" - Regular user created or automatically created // subnet. // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service @@ -58548,6 +58589,63 @@ func (s *Uint128) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UpcomingMaintenance: Upcoming Maintenance notification information. +type UpcomingMaintenance struct { + // CanReschedule: Indicates if the maintenance can be customer + // triggered. + CanReschedule bool `json:"canReschedule,omitempty"` + + // LatestWindowStartTime: The latest time for the planned maintenance + // window to start. This timestamp value is in RFC3339 text format. + LatestWindowStartTime string `json:"latestWindowStartTime,omitempty"` + + // Possible values: + // "ONGOING" - There is ongoing maintenance on this VM. + // "PENDING" - There is pending maintenance. + // "UNKNOWN" - Unknown maintenance status. Do not use this value. + MaintenanceStatus string `json:"maintenanceStatus,omitempty"` + + // Type: Defines the type of maintenance. + // + // Possible values: + // "SCHEDULED" - Scheduled maintenance (e.g. maintenance after uptime + // guarantee is complete). + // "UNKNOWN_TYPE" - No type specified. Do not use this value. + // "UNSCHEDULED" - Unscheduled maintenance (e.g. emergency maintenance + // during uptime guarantee). + Type string `json:"type,omitempty"` + + // WindowEndTime: The time by which the maintenance disruption will be + // completed. This timestamp value is in RFC3339 text format. + WindowEndTime string `json:"windowEndTime,omitempty"` + + // WindowStartTime: The current start time of the maintenance window. + // This timestamp value is in RFC3339 text format. + WindowStartTime string `json:"windowStartTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanReschedule") 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. "CanReschedule") 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 *UpcomingMaintenance) MarshalJSON() ([]byte, error) { + type NoMethod UpcomingMaintenance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UrlMap: Represents a URL Map resource. Compute Engine has two URL Map // resources: * Global (/compute/docs/reference/rest/v1/urlMaps) * // Regional (/compute/docs/reference/rest/v1/regionUrlMaps) A URL map @@ -59599,6 +59697,8 @@ type UsableSubnetwork struct { // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal // HTTP(S) Load Balancing. // "PRIVATE" - Regular user created or automatically created subnet. + // "PRIVATE_NAT" - Subnetwork used as source range for Private NAT + // Gateways. // "PRIVATE_RFC_1918" - Regular user created or automatically created // subnet. // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service diff --git a/containeranalysis/v1/containeranalysis-api.json b/containeranalysis/v1/containeranalysis-api.json index fc944bca0d6..6c82c332c5a 100644 --- a/containeranalysis/v1/containeranalysis-api.json +++ b/containeranalysis/v1/containeranalysis-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://containeranalysis.googleapis.com/", "batchPath": "batch", "canonicalName": "Container Analysis", - "description": "An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts.", + "description": "This API is a prerequisite for leveraging Artifact Analysis scanning capabilities in both Artifact Registry and with Advanced Vulnerability Insights (runtime scanning) in GKE. In addition, the Container Analysis API is an implementation of the Grafeas API, which enables storing, querying, and retrieval of critical metadata about all of your software artifacts.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/container-analysis/api/reference/rest/", "fullyEncodeReservedExpansion": true, @@ -755,7 +755,7 @@ } } }, - "revision": "20231006", + "revision": "20231103", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { diff --git a/containeranalysis/v1alpha1/containeranalysis-api.json b/containeranalysis/v1alpha1/containeranalysis-api.json index 4b2d3bcc380..7975274acbd 100644 --- a/containeranalysis/v1alpha1/containeranalysis-api.json +++ b/containeranalysis/v1alpha1/containeranalysis-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://containeranalysis.googleapis.com/", "batchPath": "batch", "canonicalName": "Container Analysis", - "description": "An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts.", + "description": "This API is a prerequisite for leveraging Artifact Analysis scanning capabilities in both Artifact Registry and with Advanced Vulnerability Insights (runtime scanning) in GKE. In addition, the Container Analysis API is an implementation of the Grafeas API, which enables storing, querying, and retrieval of critical metadata about all of your software artifacts.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/container-analysis/api/reference/rest/", "fullyEncodeReservedExpansion": true, @@ -1233,7 +1233,7 @@ } } }, - "revision": "20231006", + "revision": "20231103", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AnalysisCompleted": { diff --git a/containeranalysis/v1beta1/containeranalysis-api.json b/containeranalysis/v1beta1/containeranalysis-api.json index 4702b47c29b..5cfdf77b305 100644 --- a/containeranalysis/v1beta1/containeranalysis-api.json +++ b/containeranalysis/v1beta1/containeranalysis-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://containeranalysis.googleapis.com/", "batchPath": "batch", "canonicalName": "Container Analysis", - "description": "An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts.", + "description": "This API is a prerequisite for leveraging Artifact Analysis scanning capabilities in both Artifact Registry and with Advanced Vulnerability Insights (runtime scanning) in GKE. In addition, the Container Analysis API is an implementation of the Grafeas API, which enables storing, querying, and retrieval of critical metadata about all of your software artifacts.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/container-analysis/api/reference/rest/", "fullyEncodeReservedExpansion": true, @@ -815,7 +815,7 @@ } } }, - "revision": "20231006", + "revision": "20231103", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index e34a8b90b04..028cec4cce6 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -273,6 +273,169 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "create": { + "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "createAdvancedSiteSearch": { + "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", + "location": "query", + "type": "boolean" + }, + "dataStoreId": { + "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/dataStores", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.dataStores.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the DataStores associated with the project.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStoress under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/dataStores", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a DataStore", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.dataStores.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1136,7 +1299,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1164,7 +1327,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1489,11 +1652,255 @@ "https://www.googleapis.com/auth/cloud-platform" ] } - } + } + } + } + }, + "engines": { + "methods": { + "create": { + "description": "Creates a Engine.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "engineId": { + "description": "Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/engines", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Engine.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.engines.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Engine.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the Engines associated with the project.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Not supported.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Not supported.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/engines", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListEnginesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an Engine", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.engines.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "pause": { + "description": "Pauses the training of an existing engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:pause", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.pause", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the engine to pause. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:pause", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "resume": { + "description": "Resumes the training of an existing engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:resume", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.resume", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the engine to resume. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:resume", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "tune": { + "description": "Tunes an existing engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:tune", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.tune", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the engine to tune. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:tune", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } - } - }, - "engines": { + }, "resources": { "operations": { "methods": { @@ -1577,7 +1984,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1605,7 +2012,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1745,6 +2152,169 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "create": { + "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "createAdvancedSiteSearch": { + "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", + "location": "query", + "type": "boolean" + }, + "dataStoreId": { + "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/dataStores", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.dataStores.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the DataStores associated with the project.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStoress under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/dataStores", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a DataStore", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.dataStores.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -2536,7 +3106,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -2564,7 +3134,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -2892,7 +3462,7 @@ } } }, - "revision": "20231026", + "revision": "20231102", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3526,30 +4096,178 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaConversation", "description": "Updated conversation including the answer." }, - "relatedQuestions": { - "description": "Suggested related questions.", - "items": { - "type": "string" - }, - "type": "array" + "relatedQuestions": { + "description": "Suggested related questions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "reply": { + "$ref": "GoogleCloudDiscoveryengineV1alphaReply", + "description": "Answer to the current query." + }, + "searchResults": { + "description": "Search Results.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata": { + "description": "Metadata for Create Schema LRO.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCustomAttribute": { + "description": "A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent.", + "id": "GoogleCloudDiscoveryengineV1alphaCustomAttribute", + "properties": { + "numbers": { + "description": "The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is \"lengths_cm\". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + }, + "text": { + "description": "The textual values of this custom attribute. For example, `[\"yellow\", \"green\"]` when the key is \"color\". Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDataStore": { + "description": "DataStore captures global settings and configs at the DataStore level.", + "id": "GoogleCloudDiscoveryengineV1alphaDataStore", + "properties": { + "contentConfig": { + "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "enum": [ + "CONTENT_CONFIG_UNSPECIFIED", + "NO_CONTENT", + "CONTENT_REQUIRED", + "PUBLIC_WEBSITE" + ], + "enumDescriptions": [ + "Default value.", + "Only contains documents without any Document.content.", + "Only contains documents with Document.content.", + "The data store is used for public website search." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. Timestamp the DataStore was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, - "reply": { - "$ref": "GoogleCloudDiscoveryengineV1alphaReply", - "description": "Answer to the current query." + "defaultSchemaId": { + "description": "Output only. The id of the default Schema asscociated to this data store.", + "readOnly": true, + "type": "string" }, - "searchResults": { - "description": "Search Results.", + "displayName": { + "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "industryVertical": { + "description": "Immutable. The industry vertical that the data store registers.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical." + ], + "type": "string" + }, + "name": { + "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "solutionTypes": { + "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult" + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent." + ], + "type": "string" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata": { - "description": "Metadata for Create Schema LRO.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -3564,24 +4282,19 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCustomAttribute": { - "description": "A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent.", - "id": "GoogleCloudDiscoveryengineV1alphaCustomAttribute", + "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata", "properties": { - "numbers": { - "description": "The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is \"lengths_cm\". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.", - "items": { - "format": "double", - "type": "number" - }, - "type": "array" + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "text": { - "description": "The textual values of this custom attribute. For example, `[\"yellow\", \"green\"]` when the key is \"color\". Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.", - "items": { - "type": "string" - }, - "type": "array" + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" @@ -3717,6 +4430,283 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaEngine": { + "description": "Metadata that describes the training and serving parameters of an Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngine", + "properties": { + "chatEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", + "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." + }, + "chatEngineMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", + "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", + "readOnly": true + }, + "commonConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", + "description": "Common config spec that specifies the metadata of the engine." + }, + "createTime": { + "description": "Output only. Timestamp the Recommendation Engine was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataStoreIds": { + "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary intializations.", + "items": { + "type": "string" + }, + "type": "array" + }, + "displayName": { + "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", + "type": "string" + }, + "mediaRecommendationEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", + "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." + }, + "name": { + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "recommendationMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", + "description": "Output only. Additional information of a recommendation engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", + "readOnly": true + }, + "searchEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." + }, + "similarDocumentsConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", + "description": "Additional config specs for a `similar-items` engine." + }, + "solutionType": { + "description": "Required. The solutions of the engine.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig": { + "description": "Configurations for a Chat Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", + "properties": { + "agentCreationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", + "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using GetEngine or ListEngine API after engine creation." + }, + "dialogflowAgentToLink": { + "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using GetEngine or ListEngine API after engine creation. Please use Engine.chat_engine_metadata.dialogflow_agent for actual agent association after Engine is created.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig": { + "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using GetEngine or ListEngine API after engine creation.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", + "properties": { + "business": { + "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", + "type": "string" + }, + "defaultLanguageCode": { + "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", + "type": "string" + }, + "timeZone": { + "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata": { + "description": "Additional information of a Chat Engine. Fields in this message are output only.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", + "properties": { + "dialogflowAgent": { + "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig": { + "description": "Common configurations for an Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", + "properties": { + "companyName": { + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig": { + "description": "Additional config specs for a Media Recommendation engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", + "properties": { + "optimizationObjective": { + "description": "The optimization objective e.g. `cvr`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `ctr`, `cvr`. If not specified, we choose default based on engine type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr`", + "type": "string" + }, + "optimizationObjectiveConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", + "description": "Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5)." + }, + "trainingState": { + "description": "The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train engine in order to control cost. If not specified: the default value for `CreateEngine` method is `TRAINING`. The default value for `UpdateEngine` method is to keep the state the same as before.", + "enum": [ + "TRAINING_STATE_UNSPECIFIED", + "PAUSED", + "TRAINING" + ], + "enumDescriptions": [ + "Unspecified training state.", + "The engine training is paused.", + "The engine is training." + ], + "type": "string" + }, + "type": { + "description": "Required. The type of engine e.g. `recommended-for-you`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `recommended-for-you`, `others-you-may-like`, `more-like-this`, `most-popular-items`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig": { + "description": "Custom threshold for `cvr` optimization_objective.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", + "properties": { + "targetField": { + "description": "Required. The name of the field to target. Currently supported values: `watch-percentage`, `watch-time`.", + "type": "string" + }, + "targetFieldValueFloat": { + "description": "Required. The threshold to be applied to the target (e.g., 0.5).", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata": { + "description": "Additional information of a recommendation engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", + "properties": { + "dataState": { + "description": "Output only. The state of data requirements for this engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state even if serving state is `ACTIVE`: engines were trained successfully before, but cannot be refreshed because the underlying engine no longer has sufficient data for training.", + "enum": [ + "DATA_STATE_UNSPECIFIED", + "DATA_OK", + "DATA_ERROR" + ], + "enumDescriptions": [ + "Unspecified default value, should never be explicitly set.", + "The engine has sufficient training data.", + "The engine does not have sufficient training data. Error messages can be queried via Stackdriver." + ], + "readOnly": true, + "type": "string" + }, + "lastTuneTime": { + "description": "Output only. The timestamp when the latest successful tune finished. Only applicable on Media Recommendation engines.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "servingState": { + "description": "Output only. The serving state of the engine: `ACTIVE`, `NOT_ACTIVE`.", + "enum": [ + "SERVING_STATE_UNSPECIFIED", + "INACTIVE", + "ACTIVE", + "TUNED" + ], + "enumDescriptions": [ + "Unspecified serving state.", + "The engine is not serving.", + "The engine is serving and can be queried.", + "The engine is trained on tuned hyperparameters and can be queried." + ], + "readOnly": true, + "type": "string" + }, + "tuningOperation": { + "description": "Output only. The latest tune operation id associated with the engine. Only applicable on Media Recommendation engines. If present, this operation id can be used to determine if there is an ongoing tune for this engine. To check the operation status, send the GetOperation request with this operation id in the engine resource format. If no tuning has happened for this engine, the string is empty.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig": { + "description": "Configurations for a Search Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "properties": { + "searchAddOns": { + "description": "The add-on that this search engine enables.", + "items": { + "enum": [ + "SEARCH_ADD_ON_UNSPECIFIED", + "SEARCH_ADD_ON_LLM" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Large language model add-on." + ], + "type": "string" + }, + "type": "array" + }, + "searchTier": { + "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, please check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", + "enum": [ + "SEARCH_TIER_UNSPECIFIED", + "SEARCH_TIER_STANDARD", + "SEARCH_TIER_ENTERPRISE" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Standard tier.", + "Enterprise tier." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig": { + "description": "Additional config specs for a `similar-items` engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaFieldConfig": { "description": "Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.", "id": "GoogleCloudDiscoveryengineV1alphaFieldConfig", @@ -4110,6 +5100,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse": { + "description": "Response message for DataStoreService.ListDataStores method.", + "id": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse", + "properties": { + "dataStores": { + "description": "All the customer's DataStores.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as ListDataStoresRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse": { "description": "Response message for DocumentService.ListDocuments method.", "id": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse", @@ -4128,6 +5136,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListEnginesResponse": { + "description": "Response message for EngineService.ListEngines method.", + "id": "GoogleCloudDiscoveryengineV1alphaListEnginesResponse", + "properties": { + "engines": { + "description": "All the customer's Engines.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Not supported.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaListSchemasResponse": { "description": "Response message for SchemaService.ListSchemas method.", "id": "GoogleCloudDiscoveryengineV1alphaListSchemasResponse", @@ -4233,6 +5259,12 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest": { + "description": "Request for pausing training of an engine.", + "id": "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata": { "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata", @@ -4609,6 +5641,12 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest": { + "description": "Request for resuming training of an engine.", + "id": "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSchema": { "description": "Defines the structure and layout of a type of document data.", "id": "GoogleCloudDiscoveryengineV1alphaSchema", @@ -4737,7 +5775,7 @@ "type": "boolean" }, "servingConfig": { - "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", "type": "string" }, "spellCorrectionSpec": { @@ -5478,6 +6516,29 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata": { + "description": "Metadata associated with a tune operation.", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata", + "properties": { + "engine": { + "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest": { + "description": "Request to manually start a tuning process now (instead of waiting for the periodically scheduled tuning to happen).", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse": { + "description": "Response associated with a tune operation.", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index d9871580cf9..b35a8dd865c 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -1826,6 +1826,76 @@ func (s *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse) MarshalJ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata: Metadata +// related to the progress of the DataStoreService.CreateDataStore +// operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata: Metadata +// related to the progress of the EngineService.CreateEngine operation. +// This will be returned by the google.longrunning.Operation.metadata +// field. +type GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata: Metadata for // Create Schema LRO. type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { @@ -1915,6 +1985,161 @@ func (s *GoogleCloudDiscoveryengineV1alphaCustomAttribute) UnmarshalJSON(data [] return nil } +// GoogleCloudDiscoveryengineV1alphaDataStore: DataStore captures global +// settings and configs at the DataStore level. +type GoogleCloudDiscoveryengineV1alphaDataStore struct { + // ContentConfig: Immutable. The content config of the data store. If + // this field is unset, the server behavior defaults to + // ContentConfig.NO_CONTENT. + // + // Possible values: + // "CONTENT_CONFIG_UNSPECIFIED" - Default value. + // "NO_CONTENT" - Only contains documents without any + // Document.content. + // "CONTENT_REQUIRED" - Only contains documents with Document.content. + // "PUBLIC_WEBSITE" - The data store is used for public website + // search. + ContentConfig string `json:"contentConfig,omitempty"` + + // CreateTime: Output only. Timestamp the DataStore was created at. + CreateTime string `json:"createTime,omitempty"` + + // DefaultSchemaId: Output only. The id of the default Schema + // asscociated to this data store. + DefaultSchemaId string `json:"defaultSchemaId,omitempty"` + + // DisplayName: Required. The data store display name. This field must + // be a UTF-8 encoded string with a length limit of 128 characters. + // Otherwise, an INVALID_ARGUMENT error is returned. + DisplayName string `json:"displayName,omitempty"` + + // IndustryVertical: Immutable. The industry vertical that the data + // store registers. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not + // specific to any industry vertical. + // "MEDIA" - The media industry vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + + // Name: Immutable. The full resource name of the data store. Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/d + // ataStores/{data_store_id}`. This field must be a UTF-8 encoded string + // with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // SolutionTypes: The solutions that the data store enrolls. Available + // solutions for each industry_vertical: * `MEDIA`: + // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * + // `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. + // Other solutions cannot be enrolled. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + SolutionTypes []string `json:"solutionTypes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ContentConfig") 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. "ContentConfig") 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 *GoogleCloudDiscoveryengineV1alphaDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDataStore + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata: Metadata +// related to the progress of the DataStoreService.DeleteDataStore +// operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata: Metadata +// related to the progress of the EngineService.DeleteEngine operation. +// This will be returned by the google.longrunning.Operation.metadata +// field. +type GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata: Metadata for // DeleteSchema LRO. type GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata struct { @@ -2161,156 +2386,92 @@ func (s *GoogleCloudDiscoveryengineV1alphaDoubleList) UnmarshalJSON(data []byte) return nil } -// GoogleCloudDiscoveryengineV1alphaFieldConfig: Configurations for -// fields of a schema. For example, configuring a field is indexable, or -// searchable. -type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { - // CompletableOption: If completable_option is COMPLETABLE_ENABLED, - // field values are directly used and returned as suggestions for - // Autocomplete in CompletionService.CompleteQuery. If - // completable_option is unset, the server behavior defaults to - // COMPLETABLE_DISABLED for fields that support setting completable - // options, which are just `string` fields. For those fields that do not - // support setting completable options, the server will skip completable - // option setting, and setting completable_option for those fields will - // throw `INVALID_ARGUMENT` error. - // - // Possible values: - // "COMPLETABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "COMPLETABLE_ENABLED" - Completable option enabled for a schema - // field. - // "COMPLETABLE_DISABLED" - Completable option disabled for a schema - // field. - CompletableOption string `json:"completableOption,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngine: Metadata that describes the +// training and serving parameters of an Engine. +type GoogleCloudDiscoveryengineV1alphaEngine struct { + // ChatEngineConfig: Configurations for the Chat Engine. Only applicable + // if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` - // DynamicFacetableOption: If dynamic_facetable_option is - // DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic - // facet. Could only be DYNAMIC_FACETABLE_DISABLED if - // FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an - // `INVALID_ARGUMENT` error will be returned. If - // dynamic_facetable_option is unset, the server behavior defaults to - // DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic - // facetable options. For those fields that do not support setting - // dynamic facetable options, such as `object` and `boolean`, the server - // will skip dynamic facetable option setting, and setting - // dynamic_facetable_option for those fields will throw - // `INVALID_ARGUMENT` error. - // - // Possible values: - // "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "DYNAMIC_FACETABLE_ENABLED" - Dynamic facetable option enabled for - // a schema field. - // "DYNAMIC_FACETABLE_DISABLED" - Dynamic facetable option disabled - // for a schema field. - DynamicFacetableOption string `json:"dynamicFacetableOption,omitempty"` + // ChatEngineMetadata: Output only. Additional information of the Chat + // Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineMetadata *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` - // FieldPath: Required. Field path of the schema field. For example: - // `title`, `description`, `release_info.release_year`. - FieldPath string `json:"fieldPath,omitempty"` + // CommonConfig: Common config spec that specifies the metadata of the + // engine. + CommonConfig *GoogleCloudDiscoveryengineV1alphaEngineCommonConfig `json:"commonConfig,omitempty"` - // FieldType: Output only. Raw type of the field. - // - // Possible values: - // "FIELD_TYPE_UNSPECIFIED" - Field type is unspecified. - // "OBJECT" - Field value type is Object. - // "STRING" - Field value type is String. - // "NUMBER" - Field value type is Number. - // "INTEGER" - Field value type is Integer. - // "BOOLEAN" - Field value type is Boolean. - // "GEOLOCATION" - Field value type is Geolocation. - FieldType string `json:"fieldType,omitempty"` + // CreateTime: Output only. Timestamp the Recommendation Engine was + // created at. + CreateTime string `json:"createTime,omitempty"` - // IndexableOption: If indexable_option is INDEXABLE_ENABLED, field - // values are indexed so that it can be filtered or faceted in - // SearchService.Search. If indexable_option is unset, the server - // behavior defaults to INDEXABLE_DISABLED for fields that support - // setting indexable options. For those fields that do not support - // setting indexable options, such as `object` and `boolean` and key - // properties, the server will skip indexable_option setting, and - // setting indexable_option for those fields will throw - // `INVALID_ARGUMENT` error. + // DataStoreIds: The data stores associated with this engine. For + // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of + // engines, they can only associate with at most one data store. If + // solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same + // Collection can be associated here. Note that when used in + // CreateEngineRequest, one DataStore id must be provided as the system + // will use it for necessary intializations. + DataStoreIds []string `json:"dataStoreIds,omitempty"` + + // DisplayName: Required. The display name of the engine. Should be + // human readable. UTF-8 encoded string with limit of 1024 characters. + DisplayName string `json:"displayName,omitempty"` + + // MediaRecommendationEngineConfig: Configurations for the Media Engine. + // Only applicable on the data stores with solution_type + // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. + MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + + // Name: Immutable. The fully qualified resource name of the engine. + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. Format: + // `projects/{project_number}/locations/{location}/collections/{collectio + // n}/engines/{engine}` engine should be 1-63 characters, and valid + // characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is + // returned. + Name string `json:"name,omitempty"` + + // RecommendationMetadata: Output only. Additional information of a + // recommendation engine. Only applicable if solution_type is + // SOLUTION_TYPE_RECOMMENDATION. + RecommendationMetadata *GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata `json:"recommendationMetadata,omitempty"` + + // SearchEngineConfig: Configurations for the Search Engine. Only + // applicable if solution_type is SOLUTION_TYPE_SEARCH. + SearchEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` + + // SimilarDocumentsConfig: Additional config specs for a `similar-items` + // engine. + SimilarDocumentsConfig *GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig `json:"similarDocumentsConfig,omitempty"` + + // SolutionType: Required. The solutions of the engine. // // Possible values: - // "INDEXABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "INDEXABLE_ENABLED" - Indexable option enabled for a schema field. - // "INDEXABLE_DISABLED" - Indexable option disabled for a schema - // field. - IndexableOption string `json:"indexableOption,omitempty"` + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + SolutionType string `json:"solutionType,omitempty"` - // KeyPropertyType: Output only. Type of the key property that this - // field is mapped to. Empty string if this is not annotated as mapped - // to a key property. Example types are `title`, `description`. Full - // list is defined by `keyPropertyMapping` in the schema field - // annotation. If the schema field has a `KeyPropertyMapping` - // annotation, `indexable_option` and `searchable_option` of this field - // cannot be modified. - KeyPropertyType string `json:"keyPropertyType,omitempty"` + // UpdateTime: Output only. Timestamp the Recommendation Engine was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` - // RecsFilterableOption: If recs_filterable_option is - // FILTERABLE_ENABLED, field values are filterable by filter expression - // in RecommendationService.Recommend. If FILTERABLE_ENABLED but the - // field type is numerical, field values are not filterable by text - // queries in RecommendationService.Recommend. Only textual fields are - // supported. If recs_filterable_option is unset, the default setting is - // FILTERABLE_DISABLED for fields that support setting filterable - // options. When a field set to [FILTERABLE_DISABLED] is filtered, a - // warning is generated and an empty result is returned. - // - // Possible values: - // "FILTERABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "FILTERABLE_ENABLED" - Filterable option enabled for a schema - // field. - // "FILTERABLE_DISABLED" - Filterable option disabled for a schema - // field. - RecsFilterableOption string `json:"recsFilterableOption,omitempty"` - - // RetrievableOption: If retrievable_option is RETRIEVABLE_ENABLED, - // field values are included in the search results. If - // retrievable_option is unset, the server behavior defaults to - // RETRIEVABLE_DISABLED for fields that support setting retrievable - // options. For those fields that do not support setting retrievable - // options, such as `object` and `boolean`, the server will skip - // retrievable option setting, and setting retrievable_option for those - // fields will throw `INVALID_ARGUMENT` error. - // - // Possible values: - // "RETRIEVABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "RETRIEVABLE_ENABLED" - Retrievable option enabled for a schema - // field. - // "RETRIEVABLE_DISABLED" - Retrievable option disabled for a schema - // field. - RetrievableOption string `json:"retrievableOption,omitempty"` - - // SearchableOption: If searchable_option is SEARCHABLE_ENABLED, field - // values are searchable by text queries in SearchService.Search. If - // SEARCHABLE_ENABLED but field type is numerical, field values will not - // be searchable by text queries in SearchService.Search, as there are - // no text values associated to numerical fields. If searchable_option - // is unset, the server behavior defaults to SEARCHABLE_DISABLED for - // fields that support setting searchable options. Only `string` fields - // that have no key property mapping support setting searchable_option. - // For those fields that do not support setting searchable options, the - // server will skip searchable option setting, and setting - // searchable_option for those fields will throw `INVALID_ARGUMENT` - // error. - // - // Possible values: - // "SEARCHABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "SEARCHABLE_ENABLED" - Searchable option enabled for a schema - // field. - // "SEARCHABLE_DISABLED" - Searchable option disabled for a schema - // field. - SearchableOption string `json:"searchableOption,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CompletableOption") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") 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. "CompletableOption") to + // NullFields is a list of field names (e.g. "ChatEngineConfig") 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 @@ -2320,80 +2481,81 @@ type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaFieldConfig +func (s *GoogleCloudDiscoveryengineV1alphaEngine) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngine raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaGcsSource: Cloud Storage location -// for input content. -type GoogleCloudDiscoveryengineV1alphaGcsSource struct { - // DataSchema: The schema to use when parsing the data from the source. - // Supported values for document imports: * `document` (default): One - // JSON Document per line. Each document must have a valid Document.id. - // * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - // `input_uris` becomes a document, with the ID set to the first 128 - // bits of SHA256(URI) encoded as a hex string. * `custom`: One custom - // data JSON per row in arbitrary format that conforms to the defined - // Schema of the data store. This can only be used by Gen App Builder. * - // `csv`: A CSV file with header conforming to the defined Schema of the - // data store. Each entry after the header is imported as a Document. - // This can only be used by Gen App Builder. Supported values for user - // even imports: * `user_event` (default): One JSON UserEvent per line. - DataSchema string `json:"dataSchema,omitempty"` - - // InputUris: Required. Cloud Storage URIs to input files. URI can be up - // to 2000 characters long. URIs can match the full object path (for - // example, `gs://bucket/directory/object.json`) or a pattern matching - // one or more files, such as `gs://bucket/directory/*.json`. A request - // can contain at most 100 files (or 100,000 files if `data_schema` is - // `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` - // is `content`). - InputUris []string `json:"inputUris,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DataSchema") to - // unconditionally include in API requests. By default, fields with +// GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig: +// Configurations for a Chat Engine. +type GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig struct { + // AgentCreationConfig: The configurationt generate the Dialogflow agent + // that is associated to this Engine. Note that these configurations are + // one-time consumed by and passed to Dialogflow service. It means they + // cannot be retrieved using GetEngine or ListEngine API after engine + // creation. + AgentCreationConfig *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` + + // DialogflowAgentToLink: The resource name of an exist Dialogflow agent + // to link to this Chat Engine. Customers can either provide + // `agent_creation_config` to create agent or provide an agent name that + // links the agent with the Chat engine. Format: + // `projects//locations//agents/`. Note that the + // `dialogflow_agent_to_link` are one-time consumed by and passed to + // Dialogflow service. It means they cannot be retrieved using GetEngine + // or ListEngine API after engine creation. Please use + // Engine.chat_engine_metadata.dialogflow_agent for actual agent + // association after Engine is created. + DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") + // 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. "DataSchema") 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. "AgentCreationConfig") 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 *GoogleCloudDiscoveryengineV1alphaGcsSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaGcsSource +func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata: Metadata -// related to the progress of the ImportDocuments operation. This is -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CreateTime") to +// GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationCo +// nfig: Configurations for generating a Dialogflow agent. Note that +// these configurations are one-time consumed by and passed to +// Dialogflow service. It means they cannot be retrieved using GetEngine +// or ListEngine API after engine creation. +type GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig struct { + // Business: Name of the company, organization or other entity that the + // agent represents. Used for knowledge connector LLM prompt and for + // knowledge search. + Business string `json:"business,omitempty"` + + // DefaultLanguageCode: Required. The default language of the agent as a + // language tag. See Language Support + // (https://cloud.google.com/dialogflow/docs/reference/language) for a + // list of the currently supported language codes. + DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` + + // TimeZone: Required. The time zone of the agent from the time zone + // database (https://www.iana.org/time-zones), e.g., America/New_York, + // Europe/Paris. + TimeZone string `json:"timeZone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Business") 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 @@ -2401,7 +2563,7 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata struct { // 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 + // NullFields is a list of field names (e.g. "Business") 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 @@ -2410,72 +2572,20 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest: Request -// message for Import methods. -type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest struct { - // AutoGenerateIds: Whether to automatically generate IDs for the - // documents if absent. If set to `true`, Document.ids are automatically - // generated based on the hash of the payload, where IDs may not be - // consistent during multiple imports. In which case - // ReconciliationMode.FULL is highly recommended to avoid duplicate - // contents. If unset or set to `false`, Document.ids have to be - // specified using id_field, otherwise, documents without IDs fail to be - // imported. Only set this field when using GcsSource or BigQuerySource, - // and when GcsSource.data_schema or BigQuerySource.data_schema is - // `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. - AutoGenerateIds bool `json:"autoGenerateIds,omitempty"` - - // BigquerySource: BigQuery input source. - BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` - - // ErrorConfig: The desired location of errors incurred during the - // Import. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - - // GcsSource: Cloud Storage location for the input content. - GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` - - // IdField: The field in the Cloud Storage and BigQuery sources that - // indicates the unique IDs of the documents. For GcsSource it is the - // key of the JSON field. For instance, `my_id` for JSON `{"my_id": - // "some_uuid"}`. For BigQuerySource it is the column name of the - // BigQuery table where the unique ids are stored. The values of the - // JSON field or the BigQuery column are used as the Document.ids. The - // JSON field or the BigQuery column must be of string type, and the - // values must be set as valid strings conform to RFC-1034 - // (https://tools.ietf.org/html/rfc1034) with 1-63 characters. - // Otherwise, documents without valid IDs fail to be imported. Only set - // this field when using GcsSource or BigQuerySource, and when - // GcsSource.data_schema or BigQuerySource.data_schema is `custom`. And - // only set this field when auto_generate_ids is unset or set as - // `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is - // unset, a default value `_id` is used when importing from the allowed - // data sources. - IdField string `json:"idField,omitempty"` - - // InlineSource: The Inline source for the input content for documents. - InlineSource *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource `json:"inlineSource,omitempty"` - - // ReconciliationMode: The mode of reconciliation between existing - // documents and the documents to be imported. Defaults to - // ReconciliationMode.INCREMENTAL. - // - // Possible values: - // "RECONCILIATION_MODE_UNSPECIFIED" - Defaults to `INCREMENTAL`. - // "INCREMENTAL" - Inserts new documents or updates existing - // documents. - // "FULL" - Calculates diff and replaces the entire document dataset. - // Existing documents may be deleted if they are not present in the - // source location. - ReconciliationMode string `json:"reconciliationMode,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata: Additional +// information of a Chat Engine. Fields in this message are output only. +type GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata struct { + // DialogflowAgent: The resource name of a Dialogflow agent, that this + // Chat Engine refers to. Format: `projects//locations//agents/`. + DialogflowAgent string `json:"dialogflowAgent,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutoGenerateIds") to + // ForceSendFields is a list of field names (e.g. "DialogflowAgent") 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 @@ -2483,7 +2593,7 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoGenerateIds") to + // NullFields is a list of field names (e.g. "DialogflowAgent") 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 @@ -2493,20 +2603,21 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest +func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource: -// The inline source for the input config for ImportDocuments method. -type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource struct { - // Documents: Required. A list of documents to update/create. Each - // document must have a valid Document.id. Recommended max of 100 items. - Documents []*GoogleCloudDiscoveryengineV1alphaDocument `json:"documents,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngineCommonConfig: Common +// configurations for an Engine. +type GoogleCloudDiscoveryengineV1alphaEngineCommonConfig struct { + // CompanyName: The name of the company, business or entity that is + // associated with the engine. Setting this may help improve LLM related + // features. + CompanyName string `json:"companyName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Documents") to + // ForceSendFields is a list of field names (e.g. "CompanyName") 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 @@ -2514,36 +2625,100 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource struct // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Documents") 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. "CompanyName") 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 *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource +func (s *GoogleCloudDiscoveryengineV1alphaEngineCommonConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineCommonConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse: Response of -// the ImportDocumentsRequest. If the long running operation is done, -// then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the - // request if set. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig +// : Additional config specs for a Media Recommendation engine. +type GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig struct { + // OptimizationObjective: The optimization objective e.g. `cvr`. This + // field together with optimization_objective describe engine metadata + // to use to control engine training and serving. Currently supported + // values: `ctr`, `cvr`. If not specified, we choose default based on + // engine type. Default depends on type of recommendation: + // `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` + OptimizationObjective string `json:"optimizationObjective,omitempty"` + + // OptimizationObjectiveConfig: Name and value of the custom threshold + // for cvr optimization_objective. For target_field `watch-time`, + // target_field_value must be an integer value indicating the media + // progress time in seconds between (0, 86400] (excludes 0, includes + // 86400) (e.g., 90). For target_field `watch-percentage`, the + // target_field_value must be a valid float value between (0, 1.0] + // (excludes 0, includes 1.0) (e.g., 0.5). + OptimizationObjectiveConfig *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig `json:"optimizationObjectiveConfig,omitempty"` + + // TrainingState: The training state that the engine is in (e.g. + // `TRAINING` or `PAUSED`). Since part of the cost of running the + // service is frequency of training - this can be used to determine when + // to train engine in order to control cost. If not specified: the + // default value for `CreateEngine` method is `TRAINING`. The default + // value for `UpdateEngine` method is to keep the state the same as + // before. + // + // Possible values: + // "TRAINING_STATE_UNSPECIFIED" - Unspecified training state. + // "PAUSED" - The engine training is paused. + // "TRAINING" - The engine is training. + TrainingState string `json:"trainingState,omitempty"` + + // Type: Required. The type of engine e.g. `recommended-for-you`. This + // field together with optimization_objective describe engine metadata + // to use to control engine training and serving. Currently supported + // values: `recommended-for-you`, `others-you-may-like`, + // `more-like-this`, `most-popular-items`. + Type string `json:"type,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "OptimizationObjective") 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:"-"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // NullFields is a list of field names (e.g. "OptimizationObjective") 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 *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig +// OptimizationObjectiveConfig: Custom threshold for `cvr` +// optimization_objective. +type GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig struct { + // TargetField: Required. The name of the field to target. Currently + // supported values: `watch-percentage`, `watch-time`. + TargetField string `json:"targetField,omitempty"` + + // TargetFieldValueFloat: Required. The threshold to be applied to the + // target (e.g., 0.5). + TargetFieldValueFloat float64 `json:"targetFieldValueFloat,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetField") 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 @@ -2551,7 +2726,7 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include + // NullFields is a list of field names (e.g. "TargetField") 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 @@ -2560,22 +2735,69 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportErrorConfig: Configuration of -// destination for Import related errors. -type GoogleCloudDiscoveryengineV1alphaImportErrorConfig struct { - // GcsPrefix: Cloud Storage prefix for import errors. This must be an - // empty, existing Cloud Storage directory. Import errors are written to - // sharded files in this directory, one per line, as a JSON-encoded - // `google.rpc.Status` message. - GcsPrefix string `json:"gcsPrefix,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig + var s1 struct { + TargetFieldValueFloat gensupport.JSONFloat64 `json:"targetFieldValueFloat"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.TargetFieldValueFloat = float64(s1.TargetFieldValueFloat) + return nil +} - // ForceSendFields is a list of field names (e.g. "GcsPrefix") to +// GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata: +// Additional information of a recommendation engine. +type GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata struct { + // DataState: Output only. The state of data requirements for this + // engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the + // data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state + // even if serving state is `ACTIVE`: engines were trained successfully + // before, but cannot be refreshed because the underlying engine no + // longer has sufficient data for training. + // + // Possible values: + // "DATA_STATE_UNSPECIFIED" - Unspecified default value, should never + // be explicitly set. + // "DATA_OK" - The engine has sufficient training data. + // "DATA_ERROR" - The engine does not have sufficient training data. + // Error messages can be queried via Stackdriver. + DataState string `json:"dataState,omitempty"` + + // LastTuneTime: Output only. The timestamp when the latest successful + // tune finished. Only applicable on Media Recommendation engines. + LastTuneTime string `json:"lastTuneTime,omitempty"` + + // ServingState: Output only. The serving state of the engine: `ACTIVE`, + // `NOT_ACTIVE`. + // + // Possible values: + // "SERVING_STATE_UNSPECIFIED" - Unspecified serving state. + // "INACTIVE" - The engine is not serving. + // "ACTIVE" - The engine is serving and can be queried. + // "TUNED" - The engine is trained on tuned hyperparameters and can be + // queried. + ServingState string `json:"servingState,omitempty"` + + // TuningOperation: Output only. The latest tune operation id associated + // with the engine. Only applicable on Media Recommendation engines. If + // present, this operation id can be used to determine if there is an + // ongoing tune for this engine. To check the operation status, send the + // GetOperation request with this operation id in the engine resource + // format. If no tuning has happened for this engine, the string is + // empty. + TuningOperation string `json:"tuningOperation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataState") 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 @@ -2583,7 +2805,7 @@ type GoogleCloudDiscoveryengineV1alphaImportErrorConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsPrefix") to include in + // NullFields is a list of field names (e.g. "DataState") 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 @@ -2592,31 +2814,36 @@ type GoogleCloudDiscoveryengineV1alphaImportErrorConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportErrorConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportErrorConfig +func (s *GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata: Metadata -// related to the progress of the Import operation. This is returned by -// the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig: +// Configurations for a Search Engine. +type GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig struct { + // SearchAddOns: The add-on that this search engine enables. + // + // Possible values: + // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is + // unspecified. This is invalid to use. + // "SEARCH_ADD_ON_LLM" - Large language model add-on. + SearchAddOns []string `json:"searchAddOns,omitempty"` + + // SearchTier: The search feature tier of this engine. Different tiers + // might have different pricing. To learn more, please check the pricing + // documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not + // specified. + // + // Possible values: + // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is + // unspecified. This is invalid to use. + // "SEARCH_TIER_STANDARD" - Standard tier. + // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. + SearchTier string `json:"searchTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "SearchAddOns") 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 @@ -2624,46 +2851,176 @@ type GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata struct { // 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 + // NullFields is a list of field names (e.g. "SearchAddOns") 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 *GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest: Request -// message for the ImportUserEvents request. -type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest struct { - // BigquerySource: BigQuery input source. - BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig: +// Additional config specs for a `similar-items` engine. +type GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig struct { +} - // ErrorConfig: The desired location of errors incurred during the - // Import. Cannot be set for inline user event imports. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaFieldConfig: Configurations for +// fields of a schema. For example, configuring a field is indexable, or +// searchable. +type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { + // CompletableOption: If completable_option is COMPLETABLE_ENABLED, + // field values are directly used and returned as suggestions for + // Autocomplete in CompletionService.CompleteQuery. If + // completable_option is unset, the server behavior defaults to + // COMPLETABLE_DISABLED for fields that support setting completable + // options, which are just `string` fields. For those fields that do not + // support setting completable options, the server will skip completable + // option setting, and setting completable_option for those fields will + // throw `INVALID_ARGUMENT` error. + // + // Possible values: + // "COMPLETABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "COMPLETABLE_ENABLED" - Completable option enabled for a schema + // field. + // "COMPLETABLE_DISABLED" - Completable option disabled for a schema + // field. + CompletableOption string `json:"completableOption,omitempty"` - // GcsSource: Cloud Storage location for the input content. - GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` + // DynamicFacetableOption: If dynamic_facetable_option is + // DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic + // facet. Could only be DYNAMIC_FACETABLE_DISABLED if + // FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an + // `INVALID_ARGUMENT` error will be returned. If + // dynamic_facetable_option is unset, the server behavior defaults to + // DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic + // facetable options. For those fields that do not support setting + // dynamic facetable options, such as `object` and `boolean`, the server + // will skip dynamic facetable option setting, and setting + // dynamic_facetable_option for those fields will throw + // `INVALID_ARGUMENT` error. + // + // Possible values: + // "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "DYNAMIC_FACETABLE_ENABLED" - Dynamic facetable option enabled for + // a schema field. + // "DYNAMIC_FACETABLE_DISABLED" - Dynamic facetable option disabled + // for a schema field. + DynamicFacetableOption string `json:"dynamicFacetableOption,omitempty"` - // InlineSource: The Inline source for the input content for UserEvents. - InlineSource *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource `json:"inlineSource,omitempty"` + // FieldPath: Required. Field path of the schema field. For example: + // `title`, `description`, `release_info.release_year`. + FieldPath string `json:"fieldPath,omitempty"` - // ForceSendFields is a list of field names (e.g. "BigquerySource") to - // unconditionally include in API requests. By default, fields with + // FieldType: Output only. Raw type of the field. + // + // Possible values: + // "FIELD_TYPE_UNSPECIFIED" - Field type is unspecified. + // "OBJECT" - Field value type is Object. + // "STRING" - Field value type is String. + // "NUMBER" - Field value type is Number. + // "INTEGER" - Field value type is Integer. + // "BOOLEAN" - Field value type is Boolean. + // "GEOLOCATION" - Field value type is Geolocation. + FieldType string `json:"fieldType,omitempty"` + + // IndexableOption: If indexable_option is INDEXABLE_ENABLED, field + // values are indexed so that it can be filtered or faceted in + // SearchService.Search. If indexable_option is unset, the server + // behavior defaults to INDEXABLE_DISABLED for fields that support + // setting indexable options. For those fields that do not support + // setting indexable options, such as `object` and `boolean` and key + // properties, the server will skip indexable_option setting, and + // setting indexable_option for those fields will throw + // `INVALID_ARGUMENT` error. + // + // Possible values: + // "INDEXABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "INDEXABLE_ENABLED" - Indexable option enabled for a schema field. + // "INDEXABLE_DISABLED" - Indexable option disabled for a schema + // field. + IndexableOption string `json:"indexableOption,omitempty"` + + // KeyPropertyType: Output only. Type of the key property that this + // field is mapped to. Empty string if this is not annotated as mapped + // to a key property. Example types are `title`, `description`. Full + // list is defined by `keyPropertyMapping` in the schema field + // annotation. If the schema field has a `KeyPropertyMapping` + // annotation, `indexable_option` and `searchable_option` of this field + // cannot be modified. + KeyPropertyType string `json:"keyPropertyType,omitempty"` + + // RecsFilterableOption: If recs_filterable_option is + // FILTERABLE_ENABLED, field values are filterable by filter expression + // in RecommendationService.Recommend. If FILTERABLE_ENABLED but the + // field type is numerical, field values are not filterable by text + // queries in RecommendationService.Recommend. Only textual fields are + // supported. If recs_filterable_option is unset, the default setting is + // FILTERABLE_DISABLED for fields that support setting filterable + // options. When a field set to [FILTERABLE_DISABLED] is filtered, a + // warning is generated and an empty result is returned. + // + // Possible values: + // "FILTERABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "FILTERABLE_ENABLED" - Filterable option enabled for a schema + // field. + // "FILTERABLE_DISABLED" - Filterable option disabled for a schema + // field. + RecsFilterableOption string `json:"recsFilterableOption,omitempty"` + + // RetrievableOption: If retrievable_option is RETRIEVABLE_ENABLED, + // field values are included in the search results. If + // retrievable_option is unset, the server behavior defaults to + // RETRIEVABLE_DISABLED for fields that support setting retrievable + // options. For those fields that do not support setting retrievable + // options, such as `object` and `boolean`, the server will skip + // retrievable option setting, and setting retrievable_option for those + // fields will throw `INVALID_ARGUMENT` error. + // + // Possible values: + // "RETRIEVABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "RETRIEVABLE_ENABLED" - Retrievable option enabled for a schema + // field. + // "RETRIEVABLE_DISABLED" - Retrievable option disabled for a schema + // field. + RetrievableOption string `json:"retrievableOption,omitempty"` + + // SearchableOption: If searchable_option is SEARCHABLE_ENABLED, field + // values are searchable by text queries in SearchService.Search. If + // SEARCHABLE_ENABLED but field type is numerical, field values will not + // be searchable by text queries in SearchService.Search, as there are + // no text values associated to numerical fields. If searchable_option + // is unset, the server behavior defaults to SEARCHABLE_DISABLED for + // fields that support setting searchable options. Only `string` fields + // that have no key property mapping support setting searchable_option. + // For those fields that do not support setting searchable options, the + // server will skip searchable option setting, and setting + // searchable_option for those fields will throw `INVALID_ARGUMENT` + // error. + // + // Possible values: + // "SEARCHABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "SEARCHABLE_ENABLED" - Searchable option enabled for a schema + // field. + // "SEARCHABLE_DISABLED" - Searchable option disabled for a schema + // field. + SearchableOption string `json:"searchableOption,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompletableOption") + // 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. "BigquerySource") to + // NullFields is a list of field names (e.g. "CompletableOption") 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 @@ -2673,20 +3030,39 @@ type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest +func (s *GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaFieldConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource: -// The inline source for the input config for ImportUserEvents method. -type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource struct { - // UserEvents: Required. A list of user events to import. Recommended - // max of 10k items. - UserEvents []*GoogleCloudDiscoveryengineV1alphaUserEvent `json:"userEvents,omitempty"` +// GoogleCloudDiscoveryengineV1alphaGcsSource: Cloud Storage location +// for input content. +type GoogleCloudDiscoveryengineV1alphaGcsSource struct { + // DataSchema: The schema to use when parsing the data from the source. + // Supported values for document imports: * `document` (default): One + // JSON Document per line. Each document must have a valid Document.id. + // * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + // `input_uris` becomes a document, with the ID set to the first 128 + // bits of SHA256(URI) encoded as a hex string. * `custom`: One custom + // data JSON per row in arbitrary format that conforms to the defined + // Schema of the data store. This can only be used by Gen App Builder. * + // `csv`: A CSV file with header conforming to the defined Schema of the + // data store. Each entry after the header is imported as a Document. + // This can only be used by Gen App Builder. Supported values for user + // even imports: * `user_event` (default): One JSON UserEvent per line. + DataSchema string `json:"dataSchema,omitempty"` - // ForceSendFields is a list of field names (e.g. "UserEvents") to + // InputUris: Required. Cloud Storage URIs to input files. URI can be up + // to 2000 characters long. URIs can match the full object path (for + // example, `gs://bucket/directory/object.json`) or a pattern matching + // one or more files, such as `gs://bucket/directory/*.json`. A request + // can contain at most 100 files (or 100,000 files if `data_schema` is + // `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` + // is `content`). + InputUris []string `json:"inputUris,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataSchema") 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 @@ -2694,7 +3070,7 @@ type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource struct // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UserEvents") to include in + // NullFields is a list of field names (e.g. "DataSchema") 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 @@ -2703,35 +3079,31 @@ type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource struct NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource +func (s *GoogleCloudDiscoveryengineV1alphaGcsSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGcsSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse: Response -// of the ImportUserEventsRequest. If the long running operation was -// successful, then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors if this - // field was set in the request. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata: Metadata +// related to the progress of the ImportDocuments operation. This is +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` - // JoinedEventsCount: Count of user events imported with complete - // existing Documents. - JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` - // UnjoinedEventsCount: Count of user events imported, but with Document - // information not found in the existing Branch. - UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // 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 @@ -2739,36 +3111,81 @@ type GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") 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. "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 *GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse +func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaInterval: A floating point interval. -type GoogleCloudDiscoveryengineV1alphaInterval struct { - // ExclusiveMaximum: Exclusive upper bound. - ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest: Request +// message for Import methods. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest struct { + // AutoGenerateIds: Whether to automatically generate IDs for the + // documents if absent. If set to `true`, Document.ids are automatically + // generated based on the hash of the payload, where IDs may not be + // consistent during multiple imports. In which case + // ReconciliationMode.FULL is highly recommended to avoid duplicate + // contents. If unset or set to `false`, Document.ids have to be + // specified using id_field, otherwise, documents without IDs fail to be + // imported. Only set this field when using GcsSource or BigQuerySource, + // and when GcsSource.data_schema or BigQuerySource.data_schema is + // `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + AutoGenerateIds bool `json:"autoGenerateIds,omitempty"` - // ExclusiveMinimum: Exclusive lower bound. - ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` - // Maximum: Inclusive upper bound. - Maximum float64 `json:"maximum,omitempty"` + // ErrorConfig: The desired location of errors incurred during the + // Import. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - // Minimum: Inclusive lower bound. - Minimum float64 `json:"minimum,omitempty"` + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") to + // IdField: The field in the Cloud Storage and BigQuery sources that + // indicates the unique IDs of the documents. For GcsSource it is the + // key of the JSON field. For instance, `my_id` for JSON `{"my_id": + // "some_uuid"}`. For BigQuerySource it is the column name of the + // BigQuery table where the unique ids are stored. The values of the + // JSON field or the BigQuery column are used as the Document.ids. The + // JSON field or the BigQuery column must be of string type, and the + // values must be set as valid strings conform to RFC-1034 + // (https://tools.ietf.org/html/rfc1034) with 1-63 characters. + // Otherwise, documents without valid IDs fail to be imported. Only set + // this field when using GcsSource or BigQuerySource, and when + // GcsSource.data_schema or BigQuerySource.data_schema is `custom`. And + // only set this field when auto_generate_ids is unset or set as + // `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is + // unset, a default value `_id` is used when importing from the allowed + // data sources. + IdField string `json:"idField,omitempty"` + + // InlineSource: The Inline source for the input content for documents. + InlineSource *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource `json:"inlineSource,omitempty"` + + // ReconciliationMode: The mode of reconciliation between existing + // documents and the documents to be imported. Defaults to + // ReconciliationMode.INCREMENTAL. + // + // Possible values: + // "RECONCILIATION_MODE_UNSPECIFIED" - Defaults to `INCREMENTAL`. + // "INCREMENTAL" - Inserts new documents or updates existing + // documents. + // "FULL" - Calculates diff and replaces the entire document dataset. + // Existing documents may be deleted if they are not present in the + // source location. + ReconciliationMode string `json:"reconciliationMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoGenerateIds") 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 @@ -2776,7 +3193,7 @@ type GoogleCloudDiscoveryengineV1alphaInterval struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExclusiveMaximum") to + // NullFields is a list of field names (e.g. "AutoGenerateIds") 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 @@ -2786,84 +3203,19 @@ type GoogleCloudDiscoveryengineV1alphaInterval struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaInterval) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaInterval - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDiscoveryengineV1alphaInterval) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaInterval - var s1 struct { - ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` - ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` - Maximum gensupport.JSONFloat64 `json:"maximum"` - Minimum gensupport.JSONFloat64 `json:"minimum"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) - s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) - s.Maximum = float64(s1.Maximum) - s.Minimum = float64(s1.Minimum) - return nil -} - -// GoogleCloudDiscoveryengineV1alphaListConversationsResponse: Response -// for ListConversations method. -type GoogleCloudDiscoveryengineV1alphaListConversationsResponse struct { - // Conversations: All the Conversations for a given data store. - Conversations []*GoogleCloudDiscoveryengineV1alphaConversation `json:"conversations,omitempty"` - - // NextPageToken: Pagination token, if not returned indicates the last - // page. - 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. "Conversations") 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. "Conversations") 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 *GoogleCloudDiscoveryengineV1alphaListConversationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaListConversationsResponse +func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaListDocumentsResponse: Response -// message for DocumentService.ListDocuments method. -type GoogleCloudDiscoveryengineV1alphaListDocumentsResponse struct { - // Documents: The Documents. +// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource: +// The inline source for the input config for ImportDocuments method. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource struct { + // Documents: Required. A list of documents to update/create. Each + // document must have a valid Document.id. Recommended max of 100 items. Documents []*GoogleCloudDiscoveryengineV1alphaDocument `json:"documents,omitempty"` - // NextPageToken: A token that can be sent as - // ListDocumentsRequest.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. "Documents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2881,28 +3233,27 @@ type GoogleCloudDiscoveryengineV1alphaListDocumentsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaListDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaListSchemasResponse: Response -// message for SchemaService.ListSchemas method. -type GoogleCloudDiscoveryengineV1alphaListSchemasResponse struct { - // NextPageToken: A token that can be sent as - // ListSchemasRequest.page_token to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Schemas: The Schemas. - Schemas []*GoogleCloudDiscoveryengineV1alphaSchema `json:"schemas,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse: Response of +// the ImportDocumentsRequest. If the long running operation is done, +// then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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 @@ -2910,7 +3261,7 @@ type GoogleCloudDiscoveryengineV1alphaListSchemasResponse struct { // 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 + // NullFields is a list of field names (e.g. "ErrorConfig") 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 @@ -2919,19 +3270,22 @@ type GoogleCloudDiscoveryengineV1alphaListSchemasResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaListSchemasResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaListSchemasResponse +func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest: Request -// message for WidgetService.LookupWidgetConfig method. -type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest struct { - // WidgetConfigId: Required. The UUID of the Widget Config. - WidgetConfigId string `json:"widgetConfigId,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1alphaImportErrorConfig struct { + // GcsPrefix: Cloud Storage prefix for import errors. This must be an + // empty, existing Cloud Storage directory. Import errors are written to + // sharded files in this directory, one per line, as a JSON-encoded + // `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "WidgetConfigId") to + // ForceSendFields is a list of field names (e.g. "GcsPrefix") 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 @@ -2939,84 +3293,87 @@ type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WidgetConfigId") 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. "GcsPrefix") 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 *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest +func (s *GoogleCloudDiscoveryengineV1alphaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportErrorConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse: Response -// message for WidgetService.LookupWidgetConfig method. -type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse struct { - // AnonymousWidgetConfig: The Anonymous Widget Config associated with - // the UUID. - AnonymousWidgetConfig *GoogleCloudDiscoveryengineV1alphaWidgetConfig `json:"anonymousWidgetConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata: Metadata +// related to the progress of the Import operation. This is returned by +// the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. - // "AnonymousWidgetConfig") 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. + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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. "AnonymousWidgetConfig") 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. "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 *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse +func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaMediaInfo: Media-specific user event -// information. -type GoogleCloudDiscoveryengineV1alphaMediaInfo struct { - // MediaProgressDuration: The media progress time in seconds, if - // applicable. For example, if the end user has finished 90 seconds of a - // playback video, then MediaInfo.media_progress_duration.seconds should - // be set to 90. - MediaProgressDuration string `json:"mediaProgressDuration,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest: Request +// message for the ImportUserEvents request. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest struct { + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` - // MediaProgressPercentage: Media progress should be computed using only - // the media_progress_duration relative to the media total length. This - // value must be between `[0, 1.0]` inclusive. If this is not a playback - // or the progress cannot be computed (e.g. ongoing livestream), this - // field should be unset. - MediaProgressPercentage float64 `json:"mediaProgressPercentage,omitempty"` + // ErrorConfig: The desired location of errors incurred during the + // Import. Cannot be set for inline user event imports. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "MediaProgressDuration") 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. + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` + + // InlineSource: The Inline source for the input content for UserEvents. + InlineSource *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource `json:"inlineSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigquerySource") 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. "MediaProgressDuration") to + // NullFields is a list of field names (e.g. "BigquerySource") 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 @@ -3026,62 +3383,20 @@ type GoogleCloudDiscoveryengineV1alphaMediaInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaMediaInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaMediaInfo +func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaMediaInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaMediaInfo - var s1 struct { - MediaProgressPercentage gensupport.JSONFloat64 `json:"mediaProgressPercentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MediaProgressPercentage = float64(s1.MediaProgressPercentage) - return nil -} - -// GoogleCloudDiscoveryengineV1alphaPageInfo: Detailed page information. -type GoogleCloudDiscoveryengineV1alphaPageInfo struct { - // PageCategory: The most specific category associated with a category - // page. To represent full path of category, use '>' sign to separate - // different hierarchies. If '>' is part of the category name, please - // replace it with other character(s). Category pages include special - // pages such as sales or promotions. For instance, a special sale page - // may have the category hierarchy: "pageCategory" : "Sales > 2017 - // Black Friday Deals". Required for `view-category-page` events. Other - // event types should not set this field. Otherwise, an - // `INVALID_ARGUMENT` error is returned. - PageCategory string `json:"pageCategory,omitempty"` - - // PageviewId: A unique ID of a web page view. This should be kept the - // same for all user events triggered from the same pageview. For - // example, an item detail page view could trigger multiple events as - // the user is browsing the page. The `pageview_id` property should be - // kept the same for all these events so that they can be grouped - // together properly. When using the client side event reporting with - // JavaScript pixel and Google Tag Manager, this value is filled in - // automatically. - PageviewId string `json:"pageviewId,omitempty"` - - // ReferrerUri: The referrer URL of the current page. When using the - // client side event reporting with JavaScript pixel and Google Tag - // Manager, this value is filled in automatically. However, some browser - // privacy restrictions may cause this field to be empty. - ReferrerUri string `json:"referrerUri,omitempty"` - - // Uri: Complete URL (window.location.href) of the user's current page. - // When using the client side event reporting with JavaScript pixel and - // Google Tag Manager, this value is filled in automatically. Maximum - // length 5,000 characters. - Uri string `json:"uri,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource: +// The inline source for the input config for ImportUserEvents method. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource struct { + // UserEvents: Required. A list of user events to import. Recommended + // max of 10k items. + UserEvents []*GoogleCloudDiscoveryengineV1alphaUserEvent `json:"userEvents,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageCategory") to + // ForceSendFields is a list of field names (e.g. "UserEvents") 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 @@ -3089,39 +3404,44 @@ type GoogleCloudDiscoveryengineV1alphaPageInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageCategory") 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. "UserEvents") 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 *GoogleCloudDiscoveryengineV1alphaPageInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPageInfo +func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPanelInfo: Detailed panel -// information associated with a user event. -type GoogleCloudDiscoveryengineV1alphaPanelInfo struct { - // DisplayName: The display name of the panel. - DisplayName string `json:"displayName,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse: Response +// of the ImportUserEventsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this + // field was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - // PanelId: Required. The panel ID. - PanelId string `json:"panelId,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // PanelPosition: The ordered position of the panel, if shown to the - // user with other panels. If set, then total_panels must also be set. - PanelPosition int64 `json:"panelPosition,omitempty"` + // JoinedEventsCount: Count of user events imported with complete + // existing Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` - // TotalPanels: The total number of panels, including this one, shown to - // the user. Must be set if panel_position is set. - TotalPanels int64 `json:"totalPanels,omitempty"` + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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 @@ -3129,7 +3449,7 @@ type GoogleCloudDiscoveryengineV1alphaPanelInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include + // NullFields is a list of field names (e.g. "ErrorConfig") 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 @@ -3138,31 +3458,27 @@ type GoogleCloudDiscoveryengineV1alphaPanelInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPanelInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPanelInfo +func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata: Metadata -// related to the progress of the PurgeDocuments operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaInterval: A floating point interval. +type GoogleCloudDiscoveryengineV1alphaInterval struct { + // ExclusiveMaximum: Exclusive upper bound. + ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` + // ExclusiveMinimum: Exclusive lower bound. + ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` - // SuccessCount: Count of entries that were deleted successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` + // Maximum: Inclusive upper bound. + Maximum float64 `json:"maximum,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Minimum: Inclusive lower bound. + Minimum float64 `json:"minimum,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") 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 @@ -3170,33 +3486,57 @@ type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata struct { // 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 is a list of field names (e.g. "ExclusiveMaximum") 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 *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaInterval raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest: Request -// message for DocumentService.PurgeDocuments method. -type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest struct { - // Filter: Required. Filter matching documents to purge. Only currently - // supported value is `*` (all items). - Filter string `json:"filter,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaInterval) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaInterval + var s1 struct { + ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` + ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` + Maximum gensupport.JSONFloat64 `json:"maximum"` + Minimum gensupport.JSONFloat64 `json:"minimum"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) + s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) + s.Maximum = float64(s1.Maximum) + s.Minimum = float64(s1.Minimum) + return nil +} - // Force: Actually performs the purge. If `force` is set to false, - // return the expected purge count without deleting any documents. - Force bool `json:"force,omitempty"` +// GoogleCloudDiscoveryengineV1alphaListConversationsResponse: Response +// for ListConversations method. +type GoogleCloudDiscoveryengineV1alphaListConversationsResponse struct { + // Conversations: All the Conversations for a given data store. + Conversations []*GoogleCloudDiscoveryengineV1alphaConversation `json:"conversations,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") to + // NextPageToken: Pagination token, if not returned indicates the last + // page. + 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. "Conversations") 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 @@ -3204,36 +3544,37 @@ type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Filter") 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. "Conversations") 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 *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest +func (s *GoogleCloudDiscoveryengineV1alphaListConversationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListConversationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse: Response -// message for DocumentService.PurgeDocuments method. If the long -// running operation is successfully done, then this message is returned -// by the google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse struct { - // PurgeCount: The total count of documents purged as a result of the - // operation. - PurgeCount int64 `json:"purgeCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaListDataStoresResponse: Response +// message for DataStoreService.ListDataStores method. +type GoogleCloudDiscoveryengineV1alphaListDataStoresResponse struct { + // DataStores: All the customer's DataStores. + DataStores []*GoogleCloudDiscoveryengineV1alphaDataStore `json:"dataStores,omitempty"` - // PurgeSample: A sample of document names that will be deleted. Only - // populated if `force` is set to false. A max of 100 names will be - // returned and the names are chosen at random. - PurgeSample []string `json:"purgeSample,omitempty"` + // NextPageToken: A token that can be sent as + // ListDataStoresRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DataStores") 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 @@ -3241,7 +3582,7 @@ type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PurgeCount") to include in + // NullFields is a list of field names (e.g. "DataStores") 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 @@ -3250,31 +3591,28 @@ type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListDataStoresResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata: Metadata -// related to the progress of the PurgeUserEvents operation. This will -// be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaListDocumentsResponse: Response +// message for DocumentService.ListDocuments method. +type GoogleCloudDiscoveryengineV1alphaListDocumentsResponse struct { + // Documents: The Documents. + Documents []*GoogleCloudDiscoveryengineV1alphaDocument `json:"documents,omitempty"` - // SuccessCount: Count of entries that were deleted successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` + // NextPageToken: A token that can be sent as + // ListDocumentsRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - 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 + // ForceSendFields is a list of field names (e.g. "Documents") 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 @@ -3282,7 +3620,7 @@ type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata struct { // 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 + // NullFields is a list of field names (e.g. "Documents") 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 @@ -3291,38 +3629,26 @@ type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListDocumentsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest: Request -// message for PurgeUserEvents method. -type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest struct { - // Filter: Required. The filter string to specify the events to be - // deleted with a length limit of 5,000 characters. The eligible fields - // for filtering are: * `eventType`: Double quoted UserEvent.event_type - // string. * `eventTime`: in ISO 8601 "zulu" format. * `userPseudoId`: - // Double quoted string. Specifying this will delete all events - // associated with a visitor. * `userId`: Double quoted string. - // Specifying this will delete all events associated with a user. - // Examples: * Deleting all events in a time range: `eventTime > - // "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" * - // Deleting specific eventType: `eventType = "search" * Deleting all - // events for a specific visitor: `userPseudoId = "visitor1024" * - // Deleting all events inside a DataStore: `*` The filtering fields are - // assumed to have an implicit AND. - Filter string `json:"filter,omitempty"` +// GoogleCloudDiscoveryengineV1alphaListEnginesResponse: Response +// message for EngineService.ListEngines method. +type GoogleCloudDiscoveryengineV1alphaListEnginesResponse struct { + // Engines: All the customer's Engines. + Engines []*GoogleCloudDiscoveryengineV1alphaEngine `json:"engines,omitempty"` - // Force: The `force` field is currently not supported. Purge user event - // requests will permanently delete all purgeable events. Once the - // development is complete: If `force` is set to false, the method will - // return the expected purge count without deleting any user events. - // This field will default to false if not included in the request. - Force bool `json:"force,omitempty"` + // NextPageToken: Not supported. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Engines") 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 @@ -3330,8 +3656,8 @@ type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Engines") 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. @@ -3339,22 +3665,28 @@ type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest +func (s *GoogleCloudDiscoveryengineV1alphaListEnginesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListEnginesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse: Response of -// the PurgeUserEventsRequest. If the long running operation is -// successfully done, then this message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse struct { - // PurgeCount: The total count of events purged as a result of the - // operation. - PurgeCount int64 `json:"purgeCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaListSchemasResponse: Response +// message for SchemaService.ListSchemas method. +type GoogleCloudDiscoveryengineV1alphaListSchemasResponse struct { + // NextPageToken: A token that can be sent as + // ListSchemasRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // Schemas: The Schemas. + Schemas []*GoogleCloudDiscoveryengineV1alphaSchema `json:"schemas,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 @@ -3362,158 +3694,113 @@ type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PurgeCount") 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. "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 *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse +func (s *GoogleCloudDiscoveryengineV1alphaListSchemasResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSchemasResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecommendRequest: Request message -// for Recommend method. -type GoogleCloudDiscoveryengineV1alphaRecommendRequest struct { - // Filter: Filter for restricting recommendation results with a length - // limit of 5,000 characters. Currently, only filter expressions on the - // `filter_tags` attribute is supported. Examples: * `(filter_tags: - // ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` * - // `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: - // ANY("Green"))` If `attributeFilteringSyntax` is set to true under the - // `params` field, then attribute-based expressions are expected instead - // of the above described tag-based syntax. Examples: * (launguage: - // ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: - // true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) - // If your filter blocks all results, the API will return generic - // (unfiltered) popular Documents. If you only want results strictly - // matching the filters, set `strictFiltering` to True in - // RecommendRequest.params to receive empty results instead. Note that - // the API will never return Documents with `storageStatus` of `EXPIRED` - // or `DELETED` regardless of filter choices. - Filter string `json:"filter,omitempty"` - - // PageSize: Maximum number of results to return. Set this property to - // the number of recommendation results needed. If zero, the service - // will choose a reasonable default. The maximum allowed value is 100. - // Values above 100 will be coerced to 100. - PageSize int64 `json:"pageSize,omitempty"` +// GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest: Request +// message for WidgetService.LookupWidgetConfig method. +type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest struct { + // WidgetConfigId: Required. The UUID of the Widget Config. + WidgetConfigId string `json:"widgetConfigId,omitempty"` - // Params: Additional domain specific parameters for the - // recommendations. Allowed values: * `returnDocument`: Boolean. If set - // to true, the associated Document object will be returned in - // RecommendResponse.RecommendationResult.document. * `returnScore`: - // Boolean. If set to true, the recommendation 'score' corresponding to - // each returned Document will be set in - // RecommendResponse.RecommendationResult.metadata. The given 'score' - // indicates the probability of a Document conversion given the user's - // context and history. * `strictFiltering`: Boolean. True by default. - // If set to false, the service will return generic (unfiltered) popular - // Documents instead of empty if your filter blocks all recommendation - // results. * `diversityLevel`: String. Default empty. If set to be - // non-empty, then it needs to be one of: * `no-diversity` * - // `low-diversity` * `medium-diversity` * `high-diversity` * - // `auto-diversity` This gives request-level control and adjusts - // recommendation results based on Document category. * - // `attributeFilteringSyntax`: Boolean. False by default. If set to - // true, the `filter` field is interpreted according to the new, - // attribute-based syntax. - Params googleapi.RawMessage `json:"params,omitempty"` + // ForceSendFields is a list of field names (e.g. "WidgetConfigId") 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:"-"` - // UserEvent: Required. Context about the user, what they are looking at - // and what action they took to trigger the Recommend request. Note that - // this user event detail won't be ingested to userEvent logs. Thus, a - // separate userEvent write request is required for event logging. Don't - // set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the - // same fixed ID for different users. If you are trying to receive - // non-personalized recommendations (not recommended; this can - // negatively impact model performance), instead set - // UserEvent.user_pseudo_id to a random unique ID and leave - // UserEvent.user_info.user_id unset. - UserEvent *GoogleCloudDiscoveryengineV1alphaUserEvent `json:"userEvent,omitempty"` + // NullFields is a list of field names (e.g. "WidgetConfigId") 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:"-"` +} - // UserLabels: The user labels applied to a resource must meet the - // following requirements: * Each resource can have multiple labels, up - // to a maximum of 64. * Each label must be a key-value pair. * Keys - // have a minimum length of 1 character and a maximum length of 63 - // characters and cannot be empty. Values can be empty and have a - // maximum length of 63 characters. * Keys and values can contain only - // lowercase letters, numeric characters, underscores, and dashes. All - // characters must use UTF-8 encoding, and international characters are - // allowed. * The key portion of a label must be unique. However, you - // can use the same key with multiple resources. * Keys must start with - // a lowercase letter or international character. See Requirements for - // labels - // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - // for more details. - UserLabels map[string]string `json:"userLabels,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ValidateOnly: Use validate only mode for this recommendation query. - // If set to true, a fake model will be used that returns arbitrary - // Document IDs. Note that the validate only mode should only be used - // for testing the API, or if the model is not ready. - ValidateOnly bool `json:"validateOnly,omitempty"` +// GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse: Response +// message for WidgetService.LookupWidgetConfig method. +type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse struct { + // AnonymousWidgetConfig: The Anonymous Widget Config associated with + // the UUID. + AnonymousWidgetConfig *GoogleCloudDiscoveryengineV1alphaWidgetConfig `json:"anonymousWidgetConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") 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. + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AnonymousWidgetConfig") 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. "Filter") 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. "AnonymousWidgetConfig") 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 *GoogleCloudDiscoveryengineV1alphaRecommendRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendRequest +func (s *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecommendResponse: Response message -// for Recommend method. -type GoogleCloudDiscoveryengineV1alphaRecommendResponse struct { - // AttributionToken: A unique attribution token. This should be included - // in the UserEvent logs resulting from this recommendation, which - // enables accurate attribution of recommendation model performance. - AttributionToken string `json:"attributionToken,omitempty"` - - // MissingIds: IDs of documents in the request that were missing from - // the default Branch associated with the requested ServingConfig. - MissingIds []string `json:"missingIds,omitempty"` - - // Results: A list of recommended Documents. The order represents the - // ranking (from the most relevant Document to the least). - Results []*GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult `json:"results,omitempty"` - - // ValidateOnly: True if RecommendRequest.validate_only was set. - ValidateOnly bool `json:"validateOnly,omitempty"` +// GoogleCloudDiscoveryengineV1alphaMediaInfo: Media-specific user event +// information. +type GoogleCloudDiscoveryengineV1alphaMediaInfo struct { + // MediaProgressDuration: The media progress time in seconds, if + // applicable. For example, if the end user has finished 90 seconds of a + // playback video, then MediaInfo.media_progress_duration.seconds should + // be set to 90. + MediaProgressDuration string `json:"mediaProgressDuration,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // MediaProgressPercentage: Media progress should be computed using only + // the media_progress_duration relative to the media total length. This + // value must be between `[0, 1.0]` inclusive. If this is not a playback + // or the progress cannot be computed (e.g. ongoing livestream), this + // field should be unset. + MediaProgressPercentage float64 `json:"mediaProgressPercentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttributionToken") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "MediaProgressDuration") 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. "AttributionToken") to + // NullFields is a list of field names (e.g. "MediaProgressDuration") 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 @@ -3523,29 +3810,62 @@ type GoogleCloudDiscoveryengineV1alphaRecommendResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRecommendResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendResponse +func (s *GoogleCloudDiscoveryengineV1alphaMediaInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaMediaInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult -// : RecommendationResult represents a generic recommendation result -// with associated metadata. -type GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult struct { - // Document: Set if `returnDocument` is set to true in - // RecommendRequest.params. - Document *GoogleCloudDiscoveryengineV1alphaDocument `json:"document,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaMediaInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaMediaInfo + var s1 struct { + MediaProgressPercentage gensupport.JSONFloat64 `json:"mediaProgressPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MediaProgressPercentage = float64(s1.MediaProgressPercentage) + return nil +} - // Id: Resource ID of the recommended Document. - Id string `json:"id,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPageInfo: Detailed page information. +type GoogleCloudDiscoveryengineV1alphaPageInfo struct { + // PageCategory: The most specific category associated with a category + // page. To represent full path of category, use '>' sign to separate + // different hierarchies. If '>' is part of the category name, please + // replace it with other character(s). Category pages include special + // pages such as sales or promotions. For instance, a special sale page + // may have the category hierarchy: "pageCategory" : "Sales > 2017 + // Black Friday Deals". Required for `view-category-page` events. Other + // event types should not set this field. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + PageCategory string `json:"pageCategory,omitempty"` - // Metadata: Additional Document metadata / annotations. Possible - // values: * `score`: Recommendation score in double value. Is set if - // `returnScore` is set to true in RecommendRequest.params. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // PageviewId: A unique ID of a web page view. This should be kept the + // same for all user events triggered from the same pageview. For + // example, an item detail page view could trigger multiple events as + // the user is browsing the page. The `pageview_id` property should be + // kept the same for all these events so that they can be grouped + // together properly. When using the client side event reporting with + // JavaScript pixel and Google Tag Manager, this value is filled in + // automatically. + PageviewId string `json:"pageviewId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") to + // ReferrerUri: The referrer URL of the current page. When using the + // client side event reporting with JavaScript pixel and Google Tag + // Manager, this value is filled in automatically. However, some browser + // privacy restrictions may cause this field to be empty. + ReferrerUri string `json:"referrerUri,omitempty"` + + // Uri: Complete URL (window.location.href) of the user's current page. + // When using the client side event reporting with JavaScript pixel and + // Google Tag Manager, this value is filled in automatically. Maximum + // length 5,000 characters. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PageCategory") 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 @@ -3553,53 +3873,39 @@ type GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult stru // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Document") 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. "PageCategory") 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 *GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult +func (s *GoogleCloudDiscoveryengineV1alphaPageInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPageInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata: Metadata -// related to the progress of the SiteSearchEngineService.RecrawlUris -// operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // InvalidUris: Unique URIs in the request that don't match any - // TargetSite in the DataStore, only match TargetSites that haven't been - // fully indexed, or match a TargetSite with type EXCLUDE. - InvalidUris []string `json:"invalidUris,omitempty"` - - // PendingCount: Total number of URIs that have yet to be crawled. - PendingCount int64 `json:"pendingCount,omitempty"` - - // QuotaExceededCount: Total number of URIs that were rejected due to - // insufficient indexing resources. - QuotaExceededCount int64 `json:"quotaExceededCount,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPanelInfo: Detailed panel +// information associated with a user event. +type GoogleCloudDiscoveryengineV1alphaPanelInfo struct { + // DisplayName: The display name of the panel. + DisplayName string `json:"displayName,omitempty"` - // SuccessCount: Total number of URIs that have been crawled so far. - SuccessCount int64 `json:"successCount,omitempty"` + // PanelId: Required. The panel ID. + PanelId string `json:"panelId,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // PanelPosition: The ordered position of the panel, if shown to the + // user with other panels. If set, then total_panels must also be set. + PanelPosition int64 `json:"panelPosition,omitempty"` - // ValidUrisCount: Total number of unique URIs in the request that are - // not in invalid_uris. - ValidUrisCount int64 `json:"validUrisCount,omitempty"` + // TotalPanels: The total number of panels, including this one, shown to + // the user. Must be set if panel_position is set. + TotalPanels int64 `json:"totalPanels,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "DisplayName") 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 @@ -3607,62 +3913,45 @@ type GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata struct { // 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 + // NullFields is a list of field names (e.g. "DisplayName") 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 *GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata +func (s *GoogleCloudDiscoveryengineV1alphaPanelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPanelInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest: Request message -// for SiteSearchEngineService.RecrawlUris method. -type GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest struct { - // Uris: Required. List of URIs to crawl. At most 10K URIs are - // supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI - // should match at least one TargetSite in `site_search_engine`. - Uris []string `json:"uris,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPauseEngineRequest: Request for +// pausing training of an engine. +type GoogleCloudDiscoveryengineV1alphaPauseEngineRequest struct { +} - // ForceSendFields is a list of field names (e.g. "Uris") 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. "Uris") 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:"-"` -} +// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata: Metadata +// related to the progress of the PurgeDocuments operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` -func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` -// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse: Response -// message for SiteSearchEngineService.RecrawlUris method. -type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse struct { - // FailedUris: URIs that were not crawled before the LRO terminated. - FailedUris []string `json:"failedUris,omitempty"` + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` - // FailureSamples: Details for a sample of up to 10 `failed_uris`. - FailureSamples []*GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo `json:"failureSamples,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailedUris") to + // 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 @@ -3670,7 +3959,7 @@ type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailedUris") to include in + // 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 @@ -3679,24 +3968,24 @@ type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse +func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo: -// Details about why a particular URI failed to be crawled. Each -// FailureInfo contains one FailureReason per CorpusType. -type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo struct { - // FailureReasons: List of failure reasons by corpus type (e.g. desktop, - // mobile). - FailureReasons []*GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason `json:"failureReasons,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest: Request +// message for DocumentService.PurgeDocuments method. +type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest struct { + // Filter: Required. Filter matching documents to purge. Only currently + // supported value is `*` (all items). + Filter string `json:"filter,omitempty"` - // Uri: URI that failed to be crawled. - Uri string `json:"uri,omitempty"` + // Force: Actually performs the purge. If `force` is set to false, + // return the expected purge count without deleting any documents. + Force bool `json:"force,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailureReasons") to + // ForceSendFields is a list of field names (e.g. "Filter") 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 @@ -3704,41 +3993,36 @@ type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailureReasons") 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. "Filter") 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 *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo +func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailure -// Reason: Details about why crawling failed for a particular -// CorpusType, e.g. DESKTOP and MOBILE crawling may fail for different -// reasons. -type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason struct { - // CorpusType: DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED. - // - // Possible values: - // "CORPUS_TYPE_UNSPECIFIED" - Default value. - // "DESKTOP" - Denotes a crawling attempt for the desktop version of a - // page. - // "MOBILE" - Denotes a crawling attempt for the mobile version of a - // page. - CorpusType string `json:"corpusType,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse: Response +// message for DocumentService.PurgeDocuments method. If the long +// running operation is successfully done, then this message is returned +// by the google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse struct { + // PurgeCount: The total count of documents purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` - // ErrorMessage: Reason why the URI was not crawled. - ErrorMessage string `json:"errorMessage,omitempty"` + // PurgeSample: A sample of document names that will be deleted. Only + // populated if `force` is set to false. A max of 100 names will be + // returned and the names are chosen at random. + PurgeSample []string `json:"purgeSample,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorpusType") to + // ForceSendFields is a list of field names (e.g. "PurgeCount") 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 @@ -3746,7 +4030,7 @@ type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReaso // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorpusType") to include in + // NullFields is a list of field names (e.g. "PurgeCount") 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 @@ -3755,25 +4039,31 @@ type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReaso NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason +func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaReply: Defines a reply message to -// user. -type GoogleCloudDiscoveryengineV1alphaReply struct { - // References: References in the reply. - References []*GoogleCloudDiscoveryengineV1alphaReplyReference `json:"references,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata: Metadata +// related to the progress of the PurgeUserEvents operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // Reply: DEPRECATED: use `summary` instead. Text reply. - Reply string `json:"reply,omitempty"` + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` - // Summary: Summary based on search results. - Summary *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary `json:"summary,omitempty"` + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "References") to + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 @@ -3781,7 +4071,7 @@ type GoogleCloudDiscoveryengineV1alphaReply struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "References") to include in + // 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 @@ -3790,28 +4080,38 @@ type GoogleCloudDiscoveryengineV1alphaReply struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaReply) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaReply +func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaReplyReference: Defines reference in -// reply. -type GoogleCloudDiscoveryengineV1alphaReplyReference struct { - // AnchorText: Anchor text. - AnchorText string `json:"anchorText,omitempty"` - - // End: Anchor text end index. - End int64 `json:"end,omitempty"` - - // Start: Anchor text start index. - Start int64 `json:"start,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest: Request +// message for PurgeUserEvents method. +type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest struct { + // Filter: Required. The filter string to specify the events to be + // deleted with a length limit of 5,000 characters. The eligible fields + // for filtering are: * `eventType`: Double quoted UserEvent.event_type + // string. * `eventTime`: in ISO 8601 "zulu" format. * `userPseudoId`: + // Double quoted string. Specifying this will delete all events + // associated with a visitor. * `userId`: Double quoted string. + // Specifying this will delete all events associated with a user. + // Examples: * Deleting all events in a time range: `eventTime > + // "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" * + // Deleting specific eventType: `eventType = "search" * Deleting all + // events for a specific visitor: `userPseudoId = "visitor1024" * + // Deleting all events inside a DataStore: `*` The filtering fields are + // assumed to have an implicit AND. + Filter string `json:"filter,omitempty"` - // Uri: URI link reference. - Uri string `json:"uri,omitempty"` + // Force: The `force` field is currently not supported. Purge user event + // requests will permanently delete all purgeable events. Once the + // development is complete: If `force` is set to false, the method will + // return the expected purge count without deleting any user events. + // This field will default to false if not included in the request. + Force bool `json:"force,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnchorText") to + // ForceSendFields is a list of field names (e.g. "Filter") 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 @@ -3819,8 +4119,8 @@ type GoogleCloudDiscoveryengineV1alphaReplyReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnchorText") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Filter") 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. @@ -3828,36 +4128,22 @@ type GoogleCloudDiscoveryengineV1alphaReplyReference struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaReplyReference) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaReplyReference +func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSchema: Defines the structure and -// layout of a type of document data. -type GoogleCloudDiscoveryengineV1alphaSchema struct { - // FieldConfigs: Output only. Configurations for fields of the schema. - FieldConfigs []*GoogleCloudDiscoveryengineV1alphaFieldConfig `json:"fieldConfigs,omitempty"` - - // JsonSchema: The JSON representation of the schema. - JsonSchema string `json:"jsonSchema,omitempty"` - - // Name: Immutable. The full resource name of the schema, in the format - // of - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 - // encoded string with a length limit of 1024 characters. - Name string `json:"name,omitempty"` - - // StructSchema: The structured representation of the schema. - StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse: Response of +// the PurgeUserEventsRequest. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse struct { + // PurgeCount: The total count of events purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "FieldConfigs") to + // ForceSendFields is a list of field names (e.g. "PurgeCount") 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 @@ -3865,203 +4151,80 @@ type GoogleCloudDiscoveryengineV1alphaSchema struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldConfigs") 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. "PurgeCount") 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 *GoogleCloudDiscoveryengineV1alphaSchema) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSchema +func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchInfo: Detailed search -// information. -type GoogleCloudDiscoveryengineV1alphaSearchInfo struct { - // Offset: An integer that specifies the current offset for pagination - // (the 0-indexed starting location, amongst the products deemed by the - // API as relevant). See SearchRequest.offset for definition. If this - // field is negative, an `INVALID_ARGUMENT` is returned. This can only - // be set for `search` events. Other event types should not set this - // field. Otherwise, an `INVALID_ARGUMENT` error is returned. - Offset int64 `json:"offset,omitempty"` - - // OrderBy: The order in which products are returned, if applicable. See - // SearchRequest.order_by for definition and syntax. The value must be a - // UTF-8 encoded string with a length limit of 1,000 characters. - // Otherwise, an `INVALID_ARGUMENT` error is returned. This can only be - // set for `search` events. Other event types should not set this field. - // Otherwise, an `INVALID_ARGUMENT` error is returned. - OrderBy string `json:"orderBy,omitempty"` - - // SearchQuery: The user's search query. See SearchRequest.query for - // definition. The value must be a UTF-8 encoded string with a length - // limit of 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is - // returned. At least one of search_query or PageInfo.page_category is - // required for `search` events. Other event types should not set this - // field. Otherwise, an `INVALID_ARGUMENT` error is returned. - SearchQuery string `json:"searchQuery,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Offset") 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. "Offset") 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 *GoogleCloudDiscoveryengineV1alphaSearchInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaSearchRequest: Request message for -// SearchService.Search method. -type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { - // BoostSpec: Boost specification to boost certain documents. For more - // information on boosting, see Boosting - // (https://cloud.google.com/retail/docs/boosting#boost) - BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` - - // Branch: The branch resource name, such as - // `projects/*/locations/global/collections/default_collection/dataStores - // /default_data_store/branches/0`. Use `default_branch` as the branch - // ID or leave this field empty, to search documents under the default - // branch. - Branch string `json:"branch,omitempty"` - - // ContentSearchSpec: A specification for configuring the behavior of - // content search. - ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` - - // EmbeddingSpec: Uses the provided embedding to do additional semantic - // document retrieval. The retrieval is based on the dot product of - // SearchRequest.embedding_spec.embedding_vectors.vector and the - // document embedding that is provided in - // SearchRequest.embedding_spec.embedding_vectors.field_path. If - // SearchRequest.embedding_spec.embedding_vectors.field_path is not - // provided, it will use ServingConfig.embedding_config.field_paths. - EmbeddingSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` - - // FacetSpecs: Facet specifications for faceted search. If empty, no - // facets are returned. A maximum of 100 values are allowed. Otherwise, - // an `INVALID_ARGUMENT` error is returned. - FacetSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` - - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents - // being filtered. Filter expression is case-sensitive. If this field is - // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in - // Vertex AI Search is done by mapping the LHS filter key to a key - // property defined in the Vertex AI Search backend -- this mapping is - // defined by the customer in their schema. For example a media customer - // might have a field 'name' in their schema. In this case the filter - // would look like this: filter --> name:'ANY("king kong")' For more - // information about filtering including syntax and filter operators, - // see Filter - // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) +// GoogleCloudDiscoveryengineV1alphaRecommendRequest: Request message +// for Recommend method. +type GoogleCloudDiscoveryengineV1alphaRecommendRequest struct { + // Filter: Filter for restricting recommendation results with a length + // limit of 5,000 characters. Currently, only filter expressions on the + // `filter_tags` attribute is supported. Examples: * `(filter_tags: + // ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` * + // `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: + // ANY("Green"))` If `attributeFilteringSyntax` is set to true under the + // `params` field, then attribute-based expressions are expected instead + // of the above described tag-based syntax. Examples: * (launguage: + // ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: + // true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + // If your filter blocks all results, the API will return generic + // (unfiltered) popular Documents. If you only want results strictly + // matching the filters, set `strictFiltering` to True in + // RecommendRequest.params to receive empty results instead. Note that + // the API will never return Documents with `storageStatus` of `EXPIRED` + // or `DELETED` regardless of filter choices. Filter string `json:"filter,omitempty"` - // ImageQuery: Raw image query. - ImageQuery *GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery `json:"imageQuery,omitempty"` - - // Offset: A 0-indexed integer that specifies the current offset (that - // is, starting result location, amongst the Documents deemed by the API - // as relevant) in search results. This field is only considered if - // page_token is unset. If this field is negative, an `INVALID_ARGUMENT` - // is returned. - Offset int64 `json:"offset,omitempty"` - - // OrderBy: The order in which documents are returned. Documents can be - // ordered by a field in an Document object. Leave it unset if ordered - // by relevance. `order_by` expression is case-sensitive. For more - // information on ordering, see Ordering - // (https://cloud.google.com/retail/docs/filter-and-order#order) If this - // field is unrecognizable, an `INVALID_ARGUMENT` is returned. - OrderBy string `json:"orderBy,omitempty"` - - // PageSize: Maximum number of Documents to return. If unspecified, - // defaults to a reasonable value. The maximum allowed value is 100. - // Values above 100 are coerced to 100. If this field is negative, an - // `INVALID_ARGUMENT` is returned. + // PageSize: Maximum number of results to return. Set this property to + // the number of recommendation results needed. If zero, the service + // will choose a reasonable default. The maximum allowed value is 100. + // Values above 100 will be coerced to 100. PageSize int64 `json:"pageSize,omitempty"` - // PageToken: A page token received from a previous SearchService.Search - // call. Provide this to retrieve the subsequent page. When paginating, - // all other parameters provided to SearchService.Search must match the - // call that provided the page token. Otherwise, an `INVALID_ARGUMENT` - // error is returned. - PageToken string `json:"pageToken,omitempty"` - - // Params: Additional search parameters. For public website search only, - // supported values are: * `user_country_code`: string. Default empty. - // If set to non-empty, results are restricted or boosted based on the - // location provided. Example: user_country_code: "au" For available - // codes see Country Codes - // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) - // * `search_type`: double. Default empty. Enables non-webpage searching - // depending on the value. The only valid non-default value is 1, which - // enables image searching. Example: search_type: 1 + // Params: Additional domain specific parameters for the + // recommendations. Allowed values: * `returnDocument`: Boolean. If set + // to true, the associated Document object will be returned in + // RecommendResponse.RecommendationResult.document. * `returnScore`: + // Boolean. If set to true, the recommendation 'score' corresponding to + // each returned Document will be set in + // RecommendResponse.RecommendationResult.metadata. The given 'score' + // indicates the probability of a Document conversion given the user's + // context and history. * `strictFiltering`: Boolean. True by default. + // If set to false, the service will return generic (unfiltered) popular + // Documents instead of empty if your filter blocks all recommendation + // results. * `diversityLevel`: String. Default empty. If set to be + // non-empty, then it needs to be one of: * `no-diversity` * + // `low-diversity` * `medium-diversity` * `high-diversity` * + // `auto-diversity` This gives request-level control and adjusts + // recommendation results based on Document category. * + // `attributeFilteringSyntax`: Boolean. False by default. If set to + // true, the `filter` field is interpreted according to the new, + // attribute-based syntax. Params googleapi.RawMessage `json:"params,omitempty"` - // Query: Raw search query. - Query string `json:"query,omitempty"` - - // QueryExpansionSpec: The query expansion specification that specifies - // the conditions under which query expansion occurs. - QueryExpansionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` - - // RankingExpression: The ranking expression controls the customized - // ranking on retrieval documents. This overrides - // ServingConfig.ranking_expression. The ranking expression is a single - // function or multiple functions that are joint by "+". * - // ranking_expression = function, { " + ", function }; Supported - // functions: * double * relevance_score * double * - // dotProduct(embedding_field_path) Function variables: - // `relevance_score`: pre-defined keywords, used for measure relevance - // between query and document. `embedding_field_path`: the document - // embedding field used with query embedding vector. `dotProduct`: - // embedding function between embedding_field_path and query embedding - // vector. Example ranking expression: If document has an embedding - // field doc_embedding, the ranking expression could be `0.5 * - // relevance_score + 0.3 * dotProduct(doc_embedding)`. - RankingExpression string `json:"rankingExpression,omitempty"` - - // SafeSearch: Whether to turn on safe search. This is only supported - // for website search. - SafeSearch bool `json:"safeSearch,omitempty"` - - // ServingConfig: Required. The resource name of the Search serving - // config, such as - // `projects/*/locations/global/collections/default_collection/dataStores - // /default_data_store/servingConfigs/default_serving_config`. This - // field is used to identify the serving configuration name, set of - // models used to make the search. - ServingConfig string `json:"servingConfig,omitempty"` - - // SpellCorrectionSpec: The spell correction specification that - // specifies the mode under which spell correction takes effect. - SpellCorrectionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` - - // UserInfo: Information about the end user. Highly recommended for - // analytics. UserInfo.user_agent is used to deduce `device_type` for - // analytics. - UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` + // UserEvent: Required. Context about the user, what they are looking at + // and what action they took to trigger the Recommend request. Note that + // this user event detail won't be ingested to userEvent logs. Thus, a + // separate userEvent write request is required for event logging. Don't + // set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the + // same fixed ID for different users. If you are trying to receive + // non-personalized recommendations (not recommended; this can + // negatively impact model performance), instead set + // UserEvent.user_pseudo_id to a random unique ID and leave + // UserEvent.user_info.user_id unset. + UserEvent *GoogleCloudDiscoveryengineV1alphaUserEvent `json:"userEvent,omitempty"` // UserLabels: The user labels applied to a resource must meet the // following requirements: * Each resource can have multiple labels, up @@ -4073,24 +4236,19 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // characters must use UTF-8 encoding, and international characters are // allowed. * The key portion of a label must be unique. However, you // can use the same key with multiple resources. * Keys must start with - // a lowercase letter or international character. See Google Cloud - // Document + // a lowercase letter or international character. See Requirements for + // labels // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) // for more details. UserLabels map[string]string `json:"userLabels,omitempty"` - // UserPseudoId: A unique identifier for tracking visitors. For example, - // this could be implemented with an HTTP cookie, which should be able - // to uniquely identify a visitor on a single device. This unique - // identifier should not change if the visitor logs in or out of the - // website. This field should NOT have a fixed value such as - // `unknown_visitor`. This should be the same identifier as - // UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The - // field must be a UTF-8 encoded string with a length limit of 128 - // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - UserPseudoId string `json:"userPseudoId,omitempty"` + // ValidateOnly: Use validate only mode for this recommendation query. + // If set to true, a fake model will be used that returns arbitrary + // Document IDs. Note that the validate only mode should only be used + // for testing the API, or if the model is not ready. + ValidateOnly bool `json:"validateOnly,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoostSpec") to + // ForceSendFields is a list of field names (e.g. "Filter") 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 @@ -4098,8 +4256,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoostSpec") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Filter") 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. @@ -4107,30 +4265,44 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequest +func (s *GoogleCloudDiscoveryengineV1alphaRecommendRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec: Boost -// specification to boost certain documents. -type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec struct { - // ConditionBoostSpecs: Condition boost specifications. If a document - // matches multiple conditions in the specifictions, boost scores from - // these specifications are all applied and combined in a non-linear - // way. Maximum number of specifications is 20. - ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") - // to unconditionally include in API requests. By default, fields with +// GoogleCloudDiscoveryengineV1alphaRecommendResponse: Response message +// for Recommend method. +type GoogleCloudDiscoveryengineV1alphaRecommendResponse struct { + // AttributionToken: A unique attribution token. This should be included + // in the UserEvent logs resulting from this recommendation, which + // enables accurate attribution of recommendation model performance. + AttributionToken string `json:"attributionToken,omitempty"` + + // MissingIds: IDs of documents in the request that were missing from + // the default Branch associated with the requested ServingConfig. + MissingIds []string `json:"missingIds,omitempty"` + + // Results: A list of recommended Documents. The order represents the + // ranking (from the most relevant Document to the least). + Results []*GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult `json:"results,omitempty"` + + // ValidateOnly: True if RecommendRequest.validate_only was set. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AttributionToken") 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. "ConditionBoostSpecs") to + // NullFields is a list of field names (e.g. "AttributionToken") 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 @@ -4140,39 +4312,29 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec +func (s *GoogleCloudDiscoveryengineV1alphaRecommendResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostS -// pec: Boost applies to documents which match a condition. -type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec struct { - // Boost: Strength of the condition boost, which should be in [-1, 1]. - // Negative boost means demotion. Default is 0.0. Setting to 1.0 gives - // the document a big promotion. However, it does not necessarily mean - // that the boosted document will be the top result at all times, nor - // that other documents will be excluded. Results could still be shown - // even when none of them matches the condition. And results that are - // significantly more relevant to the search query can still trump your - // heavily favored but irrelevant documents. Setting to -1.0 gives the - // document a big demotion. However, results that are deeply relevant - // might still be shown. The document will have an upstream battle to - // get a fairly high ranking, but it is not blocked out completely. - // Setting to 0.0 means no boost applied. The boosting condition is - // ignored. - Boost float64 `json:"boost,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult +// : RecommendationResult represents a generic recommendation result +// with associated metadata. +type GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult struct { + // Document: Set if `returnDocument` is set to true in + // RecommendRequest.params. + Document *GoogleCloudDiscoveryengineV1alphaDocument `json:"document,omitempty"` - // Condition: An expression which specifies a boost condition. The - // syntax and supported fields are the same as a filter expression. See - // SearchRequest.filter for detail syntax and limitations. Examples: * - // To boost documents with document ID "doc_1" or "doc_2", and color - // "Red" or "Blue": * (id: ANY("doc_1", "doc_2")) AND (color: - // ANY("Red","Blue")) - Condition string `json:"condition,omitempty"` + // Id: Resource ID of the recommended Document. + Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Boost") to + // Metadata: Additional Document metadata / annotations. Possible + // values: * `score`: Recommendation score in double value. Is set if + // `returnScore` is set to true in RecommendRequest.params. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") 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 @@ -4180,8 +4342,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec s // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Boost") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Document") 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. @@ -4189,145 +4351,75 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec s NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec +func (s *GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec - var s1 struct { - Boost gensupport.JSONFloat64 `json:"boost"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Boost = float64(s1.Boost) - return nil -} - -// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec: A -// specification for configuring the behavior of content search. -type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { - // ExtractiveContentSpec: If there is no extractive_content_spec - // provided, there will be no extractive answer in the search response. - ExtractiveContentSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` - - // SnippetSpec: If `snippetSpec` is not specified, snippets are not - // included in the search response. - SnippetSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` - - // SummarySpec: If `summarySpec` is not specified, summaries are not - // included in the search response. - SummarySpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ExtractiveContentSpec") 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:"-"` +// GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata: Metadata +// related to the progress of the SiteSearchEngineService.RecrawlUris +// operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // NullFields is a list of field names (e.g. "ExtractiveContentSpec") 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:"-"` -} + // InvalidUris: Unique URIs in the request that don't match any + // TargetSite in the DataStore, only match TargetSites that haven't been + // fully indexed, or match a TargetSite with type EXCLUDE. + InvalidUris []string `json:"invalidUris,omitempty"` -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // PendingCount: Total number of URIs that have yet to be crawled. + PendingCount int64 `json:"pendingCount,omitempty"` -// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtract -// iveContentSpec: A specification for configuring the extractive -// content in a search response. -type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec struct { - // MaxExtractiveAnswerCount: The maximum number of extractive answers - // returned in each search result. An extractive answer is a verbatim - // answer extracted from the original document, which provides a precise - // and contextually relevant answer to the search query. If the number - // of matching answers is less than the `max_extractive_answer_count`, - // return all of the answers. Otherwise, return the - // `max_extractive_answer_count`. At most one answer is returned for - // each SearchResult. - MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` + // QuotaExceededCount: Total number of URIs that were rejected due to + // insufficient indexing resources. + QuotaExceededCount int64 `json:"quotaExceededCount,omitempty"` - // MaxExtractiveSegmentCount: The max number of extractive segments - // returned in each search result. Only applied if the DataStore is set - // to DataStore.ContentConfig.CONTENT_REQUIRED or - // DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment - // is a text segment extracted from the original document that is - // relevant to the search query, and, in general, more verbose than an - // extractive answer. The segment could then be used as input for LLMs - // to generate summaries and answers. If the number of matching segments - // is less than `max_extractive_segment_count`, return all of the - // segments. Otherwise, return the `max_extractive_segment_count`. - MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` + // SuccessCount: Total number of URIs that have been crawled so far. + SuccessCount int64 `json:"successCount,omitempty"` - // NumNextSegments: Return at most `num_next_segments` segments after - // each selected segments. - NumNextSegments int64 `json:"numNextSegments,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` - // NumPreviousSegments: Specifies whether to also include the adjacent - // from each selected segments. Return at most `num_previous_segments` - // segments before each selected segments. - NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` + // ValidUrisCount: Total number of unique URIs in the request that are + // not in invalid_uris. + ValidUrisCount int64 `json:"validUrisCount,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "MaxExtractiveAnswerCount") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "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. "MaxExtractiveAnswerCount") - // 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. "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 *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec +func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippet -// Spec: A specification for configuring snippets in a search response. -type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec struct { - // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control - // snippet return, use `return_snippet` field. For backwards - // compatibility, we will return snippet if max_snippet_count > 0. - MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` - - // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no - // affect on the snippet. - ReferenceOnly bool `json:"referenceOnly,omitempty"` - - // ReturnSnippet: If `true`, then return snippet. If no snippet can be - // generated, we return "No snippet is available for this page." A - // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also - // be returned. - ReturnSnippet bool `json:"returnSnippet,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest: Request message +// for SiteSearchEngineService.RecrawlUris method. +type GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest struct { + // Uris: Required. List of URIs to crawl. At most 10K URIs are + // supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI + // should match at least one TargetSite in `site_search_engine`. + Uris []string `json:"uris,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") to + // ForceSendFields is a list of field names (e.g. "Uris") 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 @@ -4335,107 +4427,65 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxSnippetCount") 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. "Uris") 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 *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec +func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummary -// Spec: A specification for configuring a summary returned in a search -// response. -type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec struct { - // IgnoreAdversarialQuery: Specifies whether to filter out adversarial - // queries. The default value is `false`. Google employs search-query - // classification to detect adversarial queries. No summary is returned - // if the search query is classified as an adversarial query. For - // example, a user might ask a question regarding negative comments - // about the company or submit a query designed to generate unsafe, - // policy-violating output. If this field is set to `true`, we skip - // generating summaries for adversarial queries and return fallback - // messages instead. - IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` - - // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries - // that are not summary-seeking. The default value is `false`. Google - // employs search-query classification to detect summary-seeking - // queries. No summary is returned if the search query is classified as - // a non-summary seeking query. For example, `why is the sky blue` and - // `Who is the best soccer player in the world?` are summary-seeking - // queries, but `SFO airport` and `world cup 2026` are not. They are - // most likely navigational queries. If this field is set to `true`, we - // skip generating summaries for non-summary seeking queries and return - // fallback messages instead. - IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` - - // IncludeCitations: Specifies whether to include citations in the - // summary. The default value is `false`. When this field is set to - // `true`, summaries include in-line citation numbers. Example summary - // including citations: BigQuery is Google Cloud's fully managed and - // completely serverless enterprise data warehouse [1]. BigQuery - // supports all data types, works across clouds, and has built-in - // machine learning and business intelligence, all within a unified - // platform [2, 3]. The citation numbers refer to the returned search - // results and are 1-indexed. For example, [1] means that the sentence - // is attributed to the first search result. [2, 3] means that the - // sentence is attributed to both the second and third search results. - IncludeCitations bool `json:"includeCitations,omitempty"` - - // LanguageCode: Language code for Summary. Use language tags defined by - // BCP47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is - // an experimental feature. - LanguageCode string `json:"languageCode,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse: Response +// message for SiteSearchEngineService.RecrawlUris method. +type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse struct { + // FailedUris: URIs that were not crawled before the LRO terminated. + FailedUris []string `json:"failedUris,omitempty"` - // SummaryResultCount: The number of top results to generate the summary - // from. If the number of results returned is less than - // `summaryResultCount`, the summary is generated from all of the - // results. At most five results can be used to generate a summary. - SummaryResultCount int64 `json:"summaryResultCount,omitempty"` + // FailureSamples: Details for a sample of up to 10 `failed_uris`. + FailureSamples []*GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo `json:"failureSamples,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "IgnoreAdversarialQuery") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "FailedUris") 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. "IgnoreAdversarialQuery") - // 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. "FailedUris") 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 *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec +func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec: The -// specification that uses customized query embedding vector to do -// semantic document retrieval. -type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec struct { - // EmbeddingVectors: The embedding vector used for retrieval. Limit to - // 1. - EmbeddingVectors []*GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo: +// Details about why a particular URI failed to be crawled. Each +// FailureInfo contains one FailureReason per CorpusType. +type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo struct { + // FailureReasons: List of failure reasons by corpus type (e.g. desktop, + // mobile). + FailureReasons []*GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason `json:"failureReasons,omitempty"` - // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") to + // Uri: URI that failed to be crawled. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FailureReasons") 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 @@ -4443,7 +4493,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EmbeddingVectors") to + // NullFields is a list of field names (e.g. "FailureReasons") 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 @@ -4453,22 +4503,31 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec +func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVe -// ctor: Embedding vector. -type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector struct { - // FieldPath: Embedding field path in schema. - FieldPath string `json:"fieldPath,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailure +// Reason: Details about why crawling failed for a particular +// CorpusType, e.g. DESKTOP and MOBILE crawling may fail for different +// reasons. +type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason struct { + // CorpusType: DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED. + // + // Possible values: + // "CORPUS_TYPE_UNSPECIFIED" - Default value. + // "DESKTOP" - Denotes a crawling attempt for the desktop version of a + // page. + // "MOBILE" - Denotes a crawling attempt for the mobile version of a + // page. + CorpusType string `json:"corpusType,omitempty"` - // Vector: Query embedding vector. - Vector []float64 `json:"vector,omitempty"` + // ErrorMessage: Reason why the URI was not crawled. + ErrorMessage string `json:"errorMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "FieldPath") to + // ForceSendFields is a list of field names (e.g. "CorpusType") 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 @@ -4476,7 +4535,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldPath") to include in + // NullFields is a list of field names (e.g. "CorpusType") 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 @@ -4485,189 +4544,63 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector +func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector - var s1 struct { - Vector []gensupport.JSONFloat64 `json:"vector"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Vector = make([]float64, len(s1.Vector)) - for i := range s1.Vector { - s.Vector[i] = float64(s1.Vector[i]) - } - return nil -} - -// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec: A facet -// specification to perform faceted search. -type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec struct { - // EnableDynamicPosition: Enables dynamic position for this facet. If - // set to true, the position of this facet among all facets in the - // response is determined automatically. If dynamic facets are enabled, - // it is ordered together. If set to false, the position of this facet - // in the response is the same as in the request, and it is ranked - // before the facets with dynamic position enable and all dynamic - // facets. For example, you may always want to have rating facet - // returned in the response, but it's not necessarily to always display - // the rating facet at the top. In that case, you can set - // enable_dynamic_position to true so that the position of rating facet - // in response is determined automatically. Another example, assuming - // you have the following facets in the request: * "rating", - // enable_dynamic_position = true * "price", enable_dynamic_position = - // false * "brands", enable_dynamic_position = false And also you have a - // dynamic facets enabled, which generates a facet `gender`. Then the - // final order of the facets in the response can be ("price", "brands", - // "rating", "gender") or ("price", "brands", "gender", "rating") - // depends on how API orders "gender" and "rating" facets. However, - // notice that "price" and "brands" are always ranked at first and - // second position because their enable_dynamic_position is false. - EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` - - // ExcludedFilterKeys: List of keys to exclude when faceting. By - // default, FacetKey.key is not excluded from the filter unless it is - // listed in this field. Listing a facet key in this field allows its - // values to appear as facet results, even when they are filtered out of - // search results. Using this field does not affect what search results - // are returned. For example, suppose there are 100 documents with the - // color facet "Red" and 200 documents with the color facet "Blue". A - // query containing the filter "color:ANY("Red")" and having "color" as - // FacetKey.key would by default return only "Red" documents in the - // search results, and also return "Red" with count 100 as the only - // color facet. Although there are also blue documents available, "Blue" - // would not be shown as an available facet value. If "color" is listed - // in "excludedFilterKeys", then the query returns the facet values - // "Red" with count 100 and "Blue" with count 200, because the "color" - // key is now excluded from the filter. Because this field doesn't - // affect search results, the search results are still correctly - // filtered to return only "Red" documents. A maximum of 100 values are - // allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. - ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` +// GoogleCloudDiscoveryengineV1alphaReply: Defines a reply message to +// user. +type GoogleCloudDiscoveryengineV1alphaReply struct { + // References: References in the reply. + References []*GoogleCloudDiscoveryengineV1alphaReplyReference `json:"references,omitempty"` - // FacetKey: Required. The facet key specification. - FacetKey *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` + // Reply: DEPRECATED: use `summary` instead. Text reply. + Reply string `json:"reply,omitempty"` - // Limit: Maximum of facet values that should be returned for this - // facet. If unspecified, defaults to 20. The maximum allowed value is - // 300. Values above 300 are coerced to 300. If this field is negative, - // an `INVALID_ARGUMENT` is returned. - Limit int64 `json:"limit,omitempty"` + // Summary: Summary based on search results. + Summary *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary `json:"summary,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "EnableDynamicPosition") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "References") 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. "EnableDynamicPosition") 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. "References") 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 *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec +func (s *GoogleCloudDiscoveryengineV1alphaReply) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaReply raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey: -// Specifies how a facet is computed. -type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey struct { - // CaseInsensitive: True to make facet keys case insensitive when - // getting faceting values with prefixes or contains; false otherwise. - CaseInsensitive bool `json:"caseInsensitive,omitempty"` - - // Contains: Only get facet values that contains the given strings. For - // example, suppose "category" has three values "Action > 2022", "Action - // > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the - // "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". - // Only supported on textual fields. Maximum is 10. - Contains []string `json:"contains,omitempty"` - - // Intervals: Set only if values should be bucketed into intervals. Must - // be set for facets with numerical values. Must not be set for facet - // with text values. Maximum number of intervals is 30. - Intervals []*GoogleCloudDiscoveryengineV1alphaInterval `json:"intervals,omitempty"` - - // Key: Required. Supported textual and numerical facet keys in Document - // object, over which the facet values are computed. Facet key is - // case-sensitive. - Key string `json:"key,omitempty"` - - // OrderBy: The order in which documents are returned. Allowed values - // are: * "count desc", which means order by - // SearchResponse.Facet.values.count descending. * "value desc", which - // means order by SearchResponse.Facet.values.value descending. Only - // applies to textual facets. If not set, textual values are sorted in - // natural order (https://en.wikipedia.org/wiki/Natural_sort_order); - // numerical intervals are sorted in the order given by - // FacetSpec.FacetKey.intervals. - OrderBy string `json:"orderBy,omitempty"` - - // Prefixes: Only get facet values that start with the given string - // prefix. For example, suppose "category" has three values "Action > - // 2022", "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to - // "Action", the "category" facet only contains "Action > 2022" and - // "Action > 2021". Only supported on textual fields. Maximum is 10. - Prefixes []string `json:"prefixes,omitempty"` - - // RestrictedValues: Only get facet for the given restricted values. - // Only supported on textual fields. For example, suppose "category" has - // three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If - // set "restricted_values" to "Action > 2022", the "category" facet only - // contains "Action > 2022". Only supported on textual fields. Maximum - // is 10. - RestrictedValues []string `json:"restrictedValues,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CaseInsensitive") 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:"-"` +// GoogleCloudDiscoveryengineV1alphaReplyReference: Defines reference in +// reply. +type GoogleCloudDiscoveryengineV1alphaReplyReference struct { + // AnchorText: Anchor text. + AnchorText string `json:"anchorText,omitempty"` - // NullFields is a list of field names (e.g. "CaseInsensitive") 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:"-"` -} + // End: Anchor text end index. + End int64 `json:"end,omitempty"` -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Start: Anchor text start index. + Start int64 `json:"start,omitempty"` -// GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery: Specifies -// the image query input. -type GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery struct { - // ImageBytes: Base64 encoded image bytes. Supported image formats: - // JPEG, PNG, and BMP. - ImageBytes string `json:"imageBytes,omitempty"` + // Uri: URI link reference. + Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "ImageBytes") to + // ForceSendFields is a list of field names (e.g. "AnchorText") 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 @@ -4675,7 +4608,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ImageBytes") to include in + // NullFields is a list of field names (e.g. "AnchorText") 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 @@ -4684,33 +4617,41 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery +func (s *GoogleCloudDiscoveryengineV1alphaReplyReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaReplyReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec: -// Specification to determine under which conditions query expansion -// should occur. -type GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec struct { - // Condition: The condition under which query expansion should occur. - // Default to Condition.DISABLED. - // - // Possible values: - // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In - // this case, server behavior defaults to Condition.DISABLED. - // "DISABLED" - Disabled query expansion. Only the exact search query - // is used, even if SearchResponse.total_size is zero. - // "AUTO" - Automatic query expansion built by the Search API. - Condition string `json:"condition,omitempty"` +// GoogleCloudDiscoveryengineV1alphaResumeEngineRequest: Request for +// resuming training of an engine. +type GoogleCloudDiscoveryengineV1alphaResumeEngineRequest struct { +} - // PinUnexpandedResults: Whether to pin unexpanded results. If this - // field is set to true, unexpanded products are always at the top of - // the search results, followed by the expanded results. - PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSchema: Defines the structure and +// layout of a type of document data. +type GoogleCloudDiscoveryengineV1alphaSchema struct { + // FieldConfigs: Output only. Configurations for fields of the schema. + FieldConfigs []*GoogleCloudDiscoveryengineV1alphaFieldConfig `json:"fieldConfigs,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to + // JsonSchema: The JSON representation of the schema. + JsonSchema string `json:"jsonSchema,omitempty"` + + // Name: Immutable. The full resource name of the schema, in the format + // of + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 + // encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // StructSchema: The structured representation of the schema. + StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FieldConfigs") 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 @@ -4718,38 +4659,49 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") 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. "FieldConfigs") 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 *GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec +func (s *GoogleCloudDiscoveryengineV1alphaSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSchema raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec: -// The specification for query spell correction. -type GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec struct { - // Mode: The mode under which spell correction should take effect to - // replace the original search query. Default to Mode.AUTO. - // - // Possible values: - // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this - // case, server behavior defaults to Mode.AUTO. - // "SUGGESTION_ONLY" - Search API will try to find a spell suggestion - // if there is any and put in the SearchResponse.corrected_query. The - // spell suggestion will not be used as the search query. - // "AUTO" - Automatic spell correction built by the Search API. Search - // will be based on the corrected query if found. - Mode string `json:"mode,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchInfo: Detailed search +// information. +type GoogleCloudDiscoveryengineV1alphaSearchInfo struct { + // Offset: An integer that specifies the current offset for pagination + // (the 0-indexed starting location, amongst the products deemed by the + // API as relevant). See SearchRequest.offset for definition. If this + // field is negative, an `INVALID_ARGUMENT` is returned. This can only + // be set for `search` events. Other event types should not set this + // field. Otherwise, an `INVALID_ARGUMENT` error is returned. + Offset int64 `json:"offset,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to + // OrderBy: The order in which products are returned, if applicable. See + // SearchRequest.order_by for definition and syntax. The value must be a + // UTF-8 encoded string with a length limit of 1,000 characters. + // Otherwise, an `INVALID_ARGUMENT` error is returned. This can only be + // set for `search` events. Other event types should not set this field. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + OrderBy string `json:"orderBy,omitempty"` + + // SearchQuery: The user's search query. See SearchRequest.query for + // definition. The value must be a UTF-8 encoded string with a length + // limit of 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is + // returned. At least one of search_query or PageInfo.page_category is + // required for `search` events. Other event types should not set this + // field. Otherwise, an `INVALID_ARGUMENT` error is returned. + SearchQuery string `json:"searchQuery,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Offset") 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 @@ -4757,7 +4709,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") to include in API + // NullFields is a list of field names (e.g. "Offset") 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 @@ -4766,104 +4718,175 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec +func (s *GoogleCloudDiscoveryengineV1alphaSearchInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponse: Response message for +// GoogleCloudDiscoveryengineV1alphaSearchRequest: Request message for // SearchService.Search method. -type GoogleCloudDiscoveryengineV1alphaSearchResponse struct { - // AppliedControls: Controls applied as part of the Control service. - AppliedControls []string `json:"appliedControls,omitempty"` - - // AttributionToken: A unique search token. This should be included in - // the UserEvent logs resulting from this search, which enables accurate - // attribution of search model performance. - AttributionToken string `json:"attributionToken,omitempty"` +type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { + // BoostSpec: Boost specification to boost certain documents. For more + // information on boosting, see Boosting + // (https://cloud.google.com/retail/docs/boosting#boost) + BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` - // CorrectedQuery: Contains the spell corrected query, if found. If the - // spell correction type is AUTOMATIC, then the search results are based - // on corrected_query. Otherwise the original query is used for search. - CorrectedQuery string `json:"correctedQuery,omitempty"` + // Branch: The branch resource name, such as + // `projects/*/locations/global/collections/default_collection/dataStores + // /default_data_store/branches/0`. Use `default_branch` as the branch + // ID or leave this field empty, to search documents under the default + // branch. + Branch string `json:"branch,omitempty"` - // Facets: Results of facets requested by user. - Facets []*GoogleCloudDiscoveryengineV1alphaSearchResponseFacet `json:"facets,omitempty"` + // ContentSearchSpec: A specification for configuring the behavior of + // content search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` - GeoSearchDebugInfo []*GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo `json:"geoSearchDebugInfo,omitempty"` + // EmbeddingSpec: Uses the provided embedding to do additional semantic + // document retrieval. The retrieval is based on the dot product of + // SearchRequest.embedding_spec.embedding_vectors.vector and the + // document embedding that is provided in + // SearchRequest.embedding_spec.embedding_vectors.field_path. If + // SearchRequest.embedding_spec.embedding_vectors.field_path is not + // provided, it will use ServingConfig.embedding_config.field_paths. + EmbeddingSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` - // GuidedSearchResult: Guided search result. - GuidedSearchResult *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult `json:"guidedSearchResult,omitempty"` + // FacetSpecs: Facet specifications for faceted search. If empty, no + // facets are returned. A maximum of 100 values are allowed. Otherwise, + // an `INVALID_ARGUMENT` error is returned. + FacetSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` - // NextPageToken: A token that can be sent as SearchRequest.page_token - // to retrieve the next page. If this field is omitted, there are no - // subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. Filter expression is case-sensitive. If this field is + // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in + // Vertex AI Search is done by mapping the LHS filter key to a key + // property defined in the Vertex AI Search backend -- this mapping is + // defined by the customer in their schema. For example a media customer + // might have a field 'name' in their schema. In this case the filter + // would look like this: filter --> name:'ANY("king kong")' For more + // information about filtering including syntax and filter operators, + // see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` - // QueryExpansionInfo: Query expansion information for the returned - // results. - QueryExpansionInfo *GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo `json:"queryExpansionInfo,omitempty"` + // ImageQuery: Raw image query. + ImageQuery *GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery `json:"imageQuery,omitempty"` - // RedirectUri: The URI of a customer-defined redirect page. If redirect - // action is triggered, no search is performed, and only redirect_uri - // and attribution_token are set in the response. - RedirectUri string `json:"redirectUri,omitempty"` + // Offset: A 0-indexed integer that specifies the current offset (that + // is, starting result location, amongst the Documents deemed by the API + // as relevant) in search results. This field is only considered if + // page_token is unset. If this field is negative, an `INVALID_ARGUMENT` + // is returned. + Offset int64 `json:"offset,omitempty"` - // Results: A list of matched documents. The order represents the - // ranking. - Results []*GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult `json:"results,omitempty"` + // OrderBy: The order in which documents are returned. Documents can be + // ordered by a field in an Document object. Leave it unset if ordered + // by relevance. `order_by` expression is case-sensitive. For more + // information on ordering, see Ordering + // (https://cloud.google.com/retail/docs/filter-and-order#order) If this + // field is unrecognizable, an `INVALID_ARGUMENT` is returned. + OrderBy string `json:"orderBy,omitempty"` - // Summary: A summary as part of the search results. This field is only - // returned if SearchRequest.ContentSearchSpec.summary_spec is set. - Summary *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary `json:"summary,omitempty"` + // PageSize: Maximum number of Documents to return. If unspecified, + // defaults to a reasonable value. The maximum allowed value is 100. + // Values above 100 are coerced to 100. If this field is negative, an + // `INVALID_ARGUMENT` is returned. + PageSize int64 `json:"pageSize,omitempty"` - // TotalSize: The estimated total count of matched items irrespective of - // pagination. The count of results returned by pagination may be less - // than the total_size that matches. - TotalSize int64 `json:"totalSize,omitempty"` + // PageToken: A page token received from a previous SearchService.Search + // call. Provide this to retrieve the subsequent page. When paginating, + // all other parameters provided to SearchService.Search must match the + // call that provided the page token. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + PageToken string `json:"pageToken,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Params: Additional search parameters. For public website search only, + // supported values are: * `user_country_code`: string. Default empty. + // If set to non-empty, results are restricted or boosted based on the + // location provided. Example: user_country_code: "au" For available + // codes see Country Codes + // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + // * `search_type`: double. Default empty. Enables non-webpage searching + // depending on the value. The only valid non-default value is 1, which + // enables image searching. Example: search_type: 1 + Params googleapi.RawMessage `json:"params,omitempty"` - // ForceSendFields is a list of field names (e.g. "AppliedControls") 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:"-"` + // Query: Raw search query. + Query string `json:"query,omitempty"` - // NullFields is a list of field names (e.g. "AppliedControls") 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:"-"` -} + // QueryExpansionSpec: The query expansion specification that specifies + // the conditions under which query expansion occurs. + QueryExpansionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // RankingExpression: The ranking expression controls the customized + // ranking on retrieval documents. This overrides + // ServingConfig.ranking_expression. The ranking expression is a single + // function or multiple functions that are joint by "+". * + // ranking_expression = function, { " + ", function }; Supported + // functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: + // `relevance_score`: pre-defined keywords, used for measure relevance + // between query and document. `embedding_field_path`: the document + // embedding field used with query embedding vector. `dotProduct`: + // embedding function between embedding_field_path and query embedding + // vector. Example ranking expression: If document has an embedding + // field doc_embedding, the ranking expression could be `0.5 * + // relevance_score + 0.3 * dotProduct(doc_embedding)`. + RankingExpression string `json:"rankingExpression,omitempty"` -// GoogleCloudDiscoveryengineV1alphaSearchResponseFacet: A facet result. -type GoogleCloudDiscoveryengineV1alphaSearchResponseFacet struct { - // DynamicFacet: Whether the facet is dynamically generated. - DynamicFacet bool `json:"dynamicFacet,omitempty"` + // SafeSearch: Whether to turn on safe search. This is only supported + // for website search. + SafeSearch bool `json:"safeSearch,omitempty"` - // Key: The key for this facet. E.g., "colors" or "price". It matches - // SearchRequest.FacetSpec.FacetKey.key. - Key string `json:"key,omitempty"` + // ServingConfig: Required. The resource name of the Search serving + // config, such as + // `projects/*/locations/global/collections/default_collection/engines/*/ + // servingConfigs/default_serving_config`, or + // `projects/*/locations/global/collections/default_collection/dataStores + // /default_data_store/servingConfigs/default_serving_config`. This + // field is used to identify the serving configuration name, set of + // models used to make the search. + ServingConfig string `json:"servingConfig,omitempty"` - // Values: The facet values for this field. - Values []*GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue `json:"values,omitempty"` + // SpellCorrectionSpec: The spell correction specification that + // specifies the mode under which spell correction takes effect. + SpellCorrectionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "DynamicFacet") to + // UserInfo: Information about the end user. Highly recommended for + // analytics. UserInfo.user_agent is used to deduce `device_type` for + // analytics. + UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` + + // UserLabels: The user labels applied to a resource must meet the + // following requirements: * Each resource can have multiple labels, up + // to a maximum of 64. * Each label must be a key-value pair. * Keys + // have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a + // maximum length of 63 characters. * Keys and values can contain only + // lowercase letters, numeric characters, underscores, and dashes. All + // characters must use UTF-8 encoding, and international characters are + // allowed. * The key portion of a label must be unique. However, you + // can use the same key with multiple resources. * Keys must start with + // a lowercase letter or international character. See Google Cloud + // Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // UserPseudoId: A unique identifier for tracking visitors. For example, + // this could be implemented with an HTTP cookie, which should be able + // to uniquely identify a visitor on a single device. This unique + // identifier should not change if the visitor logs in or out of the + // website. This field should NOT have a fixed value such as + // `unknown_visitor`. This should be the same identifier as + // UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The + // field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4871,69 +4894,81 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseFacet struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DynamicFacet") 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. "BoostSpec") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseFacet) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseFacet +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue: A -// facet value which contains value names and their count. -type GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue struct { - // Count: Number of items that have this facet value. - Count int64 `json:"count,omitempty,string"` - - // Interval: Interval value for a facet, such as 10, 20) for facet - // "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals. - Interval *GoogleCloudDiscoveryengineV1alphaInterval `json:"interval,omitempty"` - - // Value: Text value of a facet, such as "Black" for facet "colors". - Value string `json:"value,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec: Boost +// specification to boost certain documents. +type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec struct { + // ConditionBoostSpecs: Condition boost specifications. If a document + // matches multiple conditions in the specifictions, boost scores from + // these specifications are all applied and combined in a non-linear + // way. Maximum number of specifications is 20. + ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ConditionBoostSpecs") 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 *GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo: -// Debug information specifically related to forward geocoding issues -// arising from Geolocation Search. -type GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo struct { - // ErrorMessage: The error produced. - ErrorMessage string `json:"errorMessage,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostS +// pec: Boost applies to documents which match a condition. +type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec struct { + // Boost: Strength of the condition boost, which should be in [-1, 1]. + // Negative boost means demotion. Default is 0.0. Setting to 1.0 gives + // the document a big promotion. However, it does not necessarily mean + // that the boosted document will be the top result at all times, nor + // that other documents will be excluded. Results could still be shown + // even when none of them matches the condition. And results that are + // significantly more relevant to the search query can still trump your + // heavily favored but irrelevant documents. Setting to -1.0 gives the + // document a big demotion. However, results that are deeply relevant + // might still be shown. The document will have an upstream battle to + // get a fairly high ranking, but it is not blocked out completely. + // Setting to 0.0 means no boost applied. The boosting condition is + // ignored. + Boost float64 `json:"boost,omitempty"` - // OriginalAddressQuery: The address from which forward geocoding - // ingestion produced issues. - OriginalAddressQuery string `json:"originalAddressQuery,omitempty"` + // Condition: An expression which specifies a boost condition. The + // syntax and supported fields are the same as a filter expression. See + // SearchRequest.filter for detail syntax and limitations. Examples: * + // To boost documents with document ID "doc_1" or "doc_2", and color + // "Red" or "Blue": * (id: ANY("doc_1", "doc_2")) AND (color: + // ANY("Red","Blue")) + Condition string `json:"condition,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorMessage") to + // ForceSendFields is a list of field names (e.g. "Boost") 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 @@ -4941,41 +4976,60 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorMessage") 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. "Boost") 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 *GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult: -// Guided search result. The guided search helps user to refine the -// search results and narrow down to the real needs from a broaded -// search results. -type GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult struct { - // FollowUpQuestions: Suggested follow-up questions. - FollowUpQuestions []string `json:"followUpQuestions,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} - // RefinementAttributes: A list of ranked refinement attributes. - RefinementAttributes []*GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute `json:"refinementAttributes,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec: A +// specification for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { + // ExtractiveContentSpec: If there is no extractive_content_spec + // provided, there will be no extractive answer in the search response. + ExtractiveContentSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "FollowUpQuestions") - // 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. + // SnippetSpec: If `snippetSpec` is not specified, snippets are not + // included in the search response. + SnippetSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` + + // SummarySpec: If `summarySpec` is not specified, summaries are not + // included in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ExtractiveContentSpec") 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. "FollowUpQuestions") to + // NullFields is a list of field names (e.g. "ExtractiveContentSpec") 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 @@ -4985,153 +5039,91 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefin -// ementAttribute: Useful attribute for search result refinements. -type GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute struct { - // AttributeKey: Attribute key used to refine the results e.g. - // 'movie_type'. - AttributeKey string `json:"attributeKey,omitempty"` - - // AttributeValue: Attribute value used to refine the results e.g. - // 'drama'. - AttributeValue string `json:"attributeValue,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AttributeKey") 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. "AttributeKey") 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 *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo: -// Information describing query expansion including whether expansion -// has occurred. -type GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo struct { - // ExpandedQuery: Bool describing whether query expansion has occurred. - ExpandedQuery bool `json:"expandedQuery,omitempty"` - - // PinnedResultCount: Number of pinned results. This field will only be - // set when expansion happens and - // SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to - // true. - PinnedResultCount int64 `json:"pinnedResultCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ExpandedQuery") 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. "ExpandedQuery") 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 *GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtract +// iveContentSpec: A specification for configuring the extractive +// content in a search response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec struct { + // MaxExtractiveAnswerCount: The maximum number of extractive answers + // returned in each search result. An extractive answer is a verbatim + // answer extracted from the original document, which provides a precise + // and contextually relevant answer to the search query. If the number + // of matching answers is less than the `max_extractive_answer_count`, + // return all of the answers. Otherwise, return the + // `max_extractive_answer_count`. At most one answer is returned for + // each SearchResult. + MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` -// GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult: -// Represents the search results. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult struct { - // Document: The document data snippet in the search response. Only - // fields that are marked as retrievable are populated. - Document *GoogleCloudDiscoveryengineV1alphaDocument `json:"document,omitempty"` + // MaxExtractiveSegmentCount: The max number of extractive segments + // returned in each search result. Only applied if the DataStore is set + // to DataStore.ContentConfig.CONTENT_REQUIRED or + // DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment + // is a text segment extracted from the original document that is + // relevant to the search query, and, in general, more verbose than an + // extractive answer. The segment could then be used as input for LLMs + // to generate summaries and answers. If the number of matching segments + // is less than `max_extractive_segment_count`, return all of the + // segments. Otherwise, return the `max_extractive_segment_count`. + MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` - // Id: Document.id of the searched Document. - Id string `json:"id,omitempty"` + // NumNextSegments: Return at most `num_next_segments` segments after + // each selected segments. + NumNextSegments int64 `json:"numNextSegments,omitempty"` - // ModelScores: Google provided available scores. - ModelScores map[string]GoogleCloudDiscoveryengineV1alphaDoubleList `json:"modelScores,omitempty"` + // NumPreviousSegments: Specifies whether to also include the adjacent + // from each selected segments. Return at most `num_previous_segments` + // segments before each selected segments. + NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "MaxExtractiveAnswerCount") 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. "Document") 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. "MaxExtractiveAnswerCount") + // 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 *GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseSummary: Summary of -// the top N search result specified by the summary spec. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { - // SafetyAttributes: A collection of Safety Attribute categories and - // their associated confidence scores. - SafetyAttributes *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes `json:"safetyAttributes,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippet +// Spec: A specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec struct { + // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control + // snippet return, use `return_snippet` field. For backwards + // compatibility, we will return snippet if max_snippet_count > 0. + MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` - // SummarySkippedReasons: Additional summary-skipped reasons. This - // provides the reason for ignored cases. If nothing is skipped, this - // field is not set. - // - // Possible values: - // "SUMMARY_SKIPPED_REASON_UNSPECIFIED" - Default value. The summary - // skipped reason is not specified. - // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. - // Only populated when SummarySpec.ignore_adversarial_query is set to - // `true`. - // "NON_SUMMARY_SEEKING_QUERY_IGNORED" - The non-summary seeking query - // ignored case. Only populated when - // SummarySpec.ignore_non_summary_seeking_query is set to `true`. - // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored - // case. Google skips the summary if there are no high-relevance search - // results. For example, the data store contains facts about company A - // but the user query is asking questions about company B. - // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. - // Google skips the summary if there is a potential policy violation - // detected. This includes content that may be violent or toxic. - // "LLM_ADDON_NOT_ENABLED" - The LLM addon not enabled case. Google - // skips the summary if the LLM addon is not enabled. - SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` + // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no + // affect on the snippet. + ReferenceOnly bool `json:"referenceOnly,omitempty"` - // SummaryText: The summary content. - SummaryText string `json:"summaryText,omitempty"` + // ReturnSnippet: If `true`, then return snippet. If no snippet can be + // generated, we return "No snippet is available for this page." A + // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also + // be returned. + ReturnSnippet bool `json:"returnSnippet,omitempty"` - // ForceSendFields is a list of field names (e.g. "SafetyAttributes") to + // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") 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 @@ -5139,7 +5131,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SafetyAttributes") to + // NullFields is a list of field names (e.g. "MaxSnippetCount") 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 @@ -5149,83 +5141,65 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummary +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes -// : Safety Attribute categories and their associated confidence scores. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes struct { - // Categories: The display names of Safety Attribute categories - // associated with the generated content. Order matches the Scores. - Categories []string `json:"categories,omitempty"` - - // Scores: The confidence scores of the each category, higher value - // means higher confidence. Order matches the Categories. - Scores []float64 `json:"scores,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Categories") 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. "Categories") 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:"-"` -} +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummary +// Spec: A specification for configuring a summary returned in a search +// response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec struct { + // IgnoreAdversarialQuery: Specifies whether to filter out adversarial + // queries. The default value is `false`. Google employs search-query + // classification to detect adversarial queries. No summary is returned + // if the search query is classified as an adversarial query. For + // example, a user might ask a question regarding negative comments + // about the company or submit a query designed to generate unsafe, + // policy-violating output. If this field is set to `true`, we skip + // generating summaries for adversarial queries and return fallback + // messages instead. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries + // that are not summary-seeking. The default value is `false`. Google + // employs search-query classification to detect summary-seeking + // queries. No summary is returned if the search query is classified as + // a non-summary seeking query. For example, `why is the sky blue` and + // `Who is the best soccer player in the world?` are summary-seeking + // queries, but `SFO airport` and `world cup 2026` are not. They are + // most likely navigational queries. If this field is set to `true`, we + // skip generating summaries for non-summary seeking queries and return + // fallback messages instead. + IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes - var s1 struct { - Scores []gensupport.JSONFloat64 `json:"scores"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Scores = make([]float64, len(s1.Scores)) - for i := range s1.Scores { - s.Scores[i] = float64(s1.Scores[i]) - } - return nil -} + // IncludeCitations: Specifies whether to include citations in the + // summary. The default value is `false`. When this field is set to + // `true`, summaries include in-line citation numbers. Example summary + // including citations: BigQuery is Google Cloud's fully managed and + // completely serverless enterprise data warehouse [1]. BigQuery + // supports all data types, works across clouds, and has built-in + // machine learning and business intelligence, all within a unified + // platform [2, 3]. The citation numbers refer to the returned search + // results and are 1-indexed. For example, [1] means that the sentence + // is attributed to the first search result. [2, 3] means that the + // sentence is attributed to both the second and third search results. + IncludeCitations bool `json:"includeCitations,omitempty"` -// GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo: Verification -// information for target sites in advanced site search. -type GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo struct { - // SiteVerificationState: Site verification state indicating the - // ownership and validity. - // - // Possible values: - // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. - // "VERIFIED" - Site ownership verified. - // "UNVERIFIED" - Site ownership pending verification or verification - // failed. - // "EXEMPTED" - Site exempt from verification, e.g. a public website - // that opens to all. - SiteVerificationState string `json:"siteVerificationState,omitempty"` + // LanguageCode: Language code for Summary. Use language tags defined by + // BCP47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is + // an experimental feature. + LanguageCode string `json:"languageCode,omitempty"` - // VerifyTime: Latest site verification time. - VerifyTime string `json:"verifyTime,omitempty"` + // SummaryResultCount: The number of top results to generate the summary + // from. If the number of results returned is less than + // `summaryResultCount`, the summary is generated from all of the + // results. At most five results can be used to generate a summary. + SummaryResultCount int64 `json:"summaryResultCount,omitempty"` // ForceSendFields is a list of field names (e.g. - // "SiteVerificationState") to unconditionally include in API requests. + // "IgnoreAdversarialQuery") 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 @@ -5233,113 +5207,31 @@ type GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo struct { // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SiteVerificationState") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "IgnoreAdversarialQuery") + // 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 *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaTargetSite: A target site for the -// SiteSearchEngine. -type GoogleCloudDiscoveryengineV1alphaTargetSite struct { - // ExactMatch: Input only. If set to false, a uri_pattern is generated - // to include all pages whose address contains the provided_uri_pattern. - // If set to true, an uri_pattern is generated to try to be an exact - // match of the provided_uri_pattern or just the specific page if the - // provided_uri_pattern is a specific one. provided_uri_pattern is - // always normalized to generate the URI pattern to be used by the - // search engine. - ExactMatch bool `json:"exactMatch,omitempty"` - - // FailureReason: Output only. Failure reason. - FailureReason *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason `json:"failureReason,omitempty"` - - // GeneratedUriPattern: Output only. This is system-generated based on - // the provided_uri_pattern. - GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` - - // IndexingStatus: Output only. Indexing status. - // - // Possible values: - // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. - // "PENDING" - The target site is in the update queue and will be - // picked up by indexing pipeline. - // "FAILED" - The target site fails to be indexed. - // "SUCCEEDED" - The target site has been indexed. - // "DELETING" - The previously indexed target site has been marked to - // be deleted. This is a transitioning state which will resulted in - // either: 1. target site deleted if unindexing is successful; 2. state - // reverts to SUCCEEDED if the unindexing fails. - IndexingStatus string `json:"indexingStatus,omitempty"` - - // Name: Output only. The fully qualified resource name of the target - // site. - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/siteSearchEngine/targetSites/{target_site}` The - // `target_site_id` is system-generated. - Name string `json:"name,omitempty"` - - // ProvidedUriPattern: Required. Input only. The user provided URI - // pattern from which the `generated_uri_pattern` is generated. - ProvidedUriPattern string `json:"providedUriPattern,omitempty"` - - // SiteVerificationInfo: Output only. Site ownership and validity - // verification status. - SiteVerificationInfo *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` - - // Type: The type of the target site, e.g. whether the site is to be - // included or excluded. - // - // Possible values: - // "TYPE_UNSPECIFIED" - This value is unused. In this case, server - // behavior defaults to Type.INCLUDE. - // "INCLUDE" - Include the target site. - // "EXCLUDE" - Exclude the target site. - Type string `json:"type,omitempty"` - - // UpdateTime: Output only. The target site's last updated time. - UpdateTime string `json:"updateTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExactMatch") 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. "ExactMatch") 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 *GoogleCloudDiscoveryengineV1alphaTargetSite) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSite +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason: Site search -// indexing failure reasons. -type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason struct { - // QuotaFailure: Failed due to insufficient quota. - QuotaFailure *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec: The +// specification that uses customized query embedding vector to do +// semantic document retrieval. +type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec struct { + // EmbeddingVectors: The embedding vector used for retrieval. Limit to + // 1. + EmbeddingVectors []*GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuotaFailure") to + // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") 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 @@ -5347,33 +5239,32 @@ type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuotaFailure") 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. "EmbeddingVectors") 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 *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure struct { -} - -// GoogleCloudDiscoveryengineV1alphaTextInput: Defines text input. -type GoogleCloudDiscoveryengineV1alphaTextInput struct { - // Context: Conversation context of the input. - Context *GoogleCloudDiscoveryengineV1alphaConversationContext `json:"context,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVe +// ctor: Embedding vector. +type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector struct { + // FieldPath: Embedding field path in schema. + FieldPath string `json:"fieldPath,omitempty"` - // Input: Text input. - Input string `json:"input,omitempty"` + // Vector: Query embedding vector. + Vector []float64 `json:"vector,omitempty"` - // ForceSendFields is a list of field names (e.g. "Context") to + // ForceSendFields is a list of field names (e.g. "FieldPath") 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 @@ -5381,7 +5272,7 @@ type GoogleCloudDiscoveryengineV1alphaTextInput struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Context") to include in + // NullFields is a list of field names (e.g. "FieldPath") 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 @@ -5390,47 +5281,158 @@ type GoogleCloudDiscoveryengineV1alphaTextInput struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTextInput) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTextInput +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTransactionInfo: A transaction -// represents the entire purchase transaction. -type GoogleCloudDiscoveryengineV1alphaTransactionInfo struct { - // Cost: All the costs associated with the products. These can be - // manufacturing costs, shipping expenses not borne by the end user, or - // any other costs, such that: * Profit = value - tax - cost - Cost float64 `json:"cost,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector + var s1 struct { + Vector []gensupport.JSONFloat64 `json:"vector"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Vector = make([]float64, len(s1.Vector)) + for i := range s1.Vector { + s.Vector[i] = float64(s1.Vector[i]) + } + return nil +} - // Currency: Required. Currency code. Use three-character ISO-4217 code. - Currency string `json:"currency,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec: A facet +// specification to perform faceted search. +type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec struct { + // EnableDynamicPosition: Enables dynamic position for this facet. If + // set to true, the position of this facet among all facets in the + // response is determined automatically. If dynamic facets are enabled, + // it is ordered together. If set to false, the position of this facet + // in the response is the same as in the request, and it is ranked + // before the facets with dynamic position enable and all dynamic + // facets. For example, you may always want to have rating facet + // returned in the response, but it's not necessarily to always display + // the rating facet at the top. In that case, you can set + // enable_dynamic_position to true so that the position of rating facet + // in response is determined automatically. Another example, assuming + // you have the following facets in the request: * "rating", + // enable_dynamic_position = true * "price", enable_dynamic_position = + // false * "brands", enable_dynamic_position = false And also you have a + // dynamic facets enabled, which generates a facet `gender`. Then the + // final order of the facets in the response can be ("price", "brands", + // "rating", "gender") or ("price", "brands", "gender", "rating") + // depends on how API orders "gender" and "rating" facets. However, + // notice that "price" and "brands" are always ranked at first and + // second position because their enable_dynamic_position is false. + EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` - // DiscountValue: The total discount(s) value applied to this - // transaction. This figure should be excluded from - // TransactionInfo.value For example, if a user paid - // TransactionInfo.value amount, then nominal (pre-discount) value of - // the transaction is the sum of TransactionInfo.value and - // TransactionInfo.discount_value This means that profit is calculated - // the same way, regardless of the discount value, and that - // TransactionInfo.discount_value can be larger than - // TransactionInfo.value: * Profit = value - tax - cost - DiscountValue float64 `json:"discountValue,omitempty"` + // ExcludedFilterKeys: List of keys to exclude when faceting. By + // default, FacetKey.key is not excluded from the filter unless it is + // listed in this field. Listing a facet key in this field allows its + // values to appear as facet results, even when they are filtered out of + // search results. Using this field does not affect what search results + // are returned. For example, suppose there are 100 documents with the + // color facet "Red" and 200 documents with the color facet "Blue". A + // query containing the filter "color:ANY("Red")" and having "color" as + // FacetKey.key would by default return only "Red" documents in the + // search results, and also return "Red" with count 100 as the only + // color facet. Although there are also blue documents available, "Blue" + // would not be shown as an available facet value. If "color" is listed + // in "excludedFilterKeys", then the query returns the facet values + // "Red" with count 100 and "Blue" with count 200, because the "color" + // key is now excluded from the filter. Because this field doesn't + // affect search results, the search results are still correctly + // filtered to return only "Red" documents. A maximum of 100 values are + // allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. + ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` - // Tax: All the taxes associated with the transaction. - Tax float64 `json:"tax,omitempty"` + // FacetKey: Required. The facet key specification. + FacetKey *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` - // TransactionId: The transaction ID with a length limit of 128 - // characters. - TransactionId string `json:"transactionId,omitempty"` + // Limit: Maximum of facet values that should be returned for this + // facet. If unspecified, defaults to 20. The maximum allowed value is + // 300. Values above 300 are coerced to 300. If this field is negative, + // an `INVALID_ARGUMENT` is returned. + Limit int64 `json:"limit,omitempty"` - // Value: Required. Total non-zero value associated with the - // transaction. This value may include shipping, tax, or other - // adjustments to the total value that you want to include. - Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "EnableDynamicPosition") 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:"-"` - // ForceSendFields is a list of field names (e.g. "Cost") to + // NullFields is a list of field names (e.g. "EnableDynamicPosition") 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 *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey: +// Specifies how a facet is computed. +type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey struct { + // CaseInsensitive: True to make facet keys case insensitive when + // getting faceting values with prefixes or contains; false otherwise. + CaseInsensitive bool `json:"caseInsensitive,omitempty"` + + // Contains: Only get facet values that contains the given strings. For + // example, suppose "category" has three values "Action > 2022", "Action + // > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the + // "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". + // Only supported on textual fields. Maximum is 10. + Contains []string `json:"contains,omitempty"` + + // Intervals: Set only if values should be bucketed into intervals. Must + // be set for facets with numerical values. Must not be set for facet + // with text values. Maximum number of intervals is 30. + Intervals []*GoogleCloudDiscoveryengineV1alphaInterval `json:"intervals,omitempty"` + + // Key: Required. Supported textual and numerical facet keys in Document + // object, over which the facet values are computed. Facet key is + // case-sensitive. + Key string `json:"key,omitempty"` + + // OrderBy: The order in which documents are returned. Allowed values + // are: * "count desc", which means order by + // SearchResponse.Facet.values.count descending. * "value desc", which + // means order by SearchResponse.Facet.values.value descending. Only + // applies to textual facets. If not set, textual values are sorted in + // natural order (https://en.wikipedia.org/wiki/Natural_sort_order); + // numerical intervals are sorted in the order given by + // FacetSpec.FacetKey.intervals. + OrderBy string `json:"orderBy,omitempty"` + + // Prefixes: Only get facet values that start with the given string + // prefix. For example, suppose "category" has three values "Action > + // 2022", "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to + // "Action", the "category" facet only contains "Action > 2022" and + // "Action > 2021". Only supported on textual fields. Maximum is 10. + Prefixes []string `json:"prefixes,omitempty"` + + // RestrictedValues: Only get facet for the given restricted values. + // Only supported on textual fields. For example, suppose "category" has + // three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If + // set "restricted_values" to "Action > 2022", the "category" facet only + // contains "Action > 2022". Only supported on textual fields. Maximum + // is 10. + RestrictedValues []string `json:"restrictedValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaseInsensitive") 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 @@ -5438,8 +5440,39 @@ type GoogleCloudDiscoveryengineV1alphaTransactionInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cost") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "CaseInsensitive") 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 *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery: Specifies +// the image query input. +type GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery struct { + // ImageBytes: Base64 encoded image bytes. Supported image formats: + // JPEG, PNG, and BMP. + ImageBytes string `json:"imageBytes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ImageBytes") 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. "ImageBytes") 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. @@ -5447,43 +5480,33 @@ type GoogleCloudDiscoveryengineV1alphaTransactionInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTransactionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTransactionInfo +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaTransactionInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaTransactionInfo - var s1 struct { - Cost gensupport.JSONFloat64 `json:"cost"` - DiscountValue gensupport.JSONFloat64 `json:"discountValue"` - Tax gensupport.JSONFloat64 `json:"tax"` - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Cost = float64(s1.Cost) - s.DiscountValue = float64(s1.DiscountValue) - s.Tax = float64(s1.Tax) - s.Value = float64(s1.Value) - return nil -} - -// GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for -// UpdateSchema LRO. -type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec: +// Specification to determine under which conditions query expansion +// should occur. +type GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec struct { + // Condition: The condition under which query expansion should occur. + // Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In + // this case, server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disabled query expansion. Only the exact search query + // is used, even if SearchResponse.total_size is zero. + // "AUTO" - Automatic query expansion built by the Search API. + Condition string `json:"condition,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // PinUnexpandedResults: Whether to pin unexpanded results. If this + // field is set to true, unexpanded products are always at the top of + // the search results, followed by the expanded results. + PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Condition") 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 @@ -5491,7 +5514,7 @@ type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata struct { // 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 + // NullFields is a list of field names (e.g. "Condition") 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 @@ -5500,165 +5523,107 @@ type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaUserEvent: UserEvent captures all -// metadata information Discovery Engine API needs to know about how end -// users interact with customers' website. -type GoogleCloudDiscoveryengineV1alphaUserEvent struct { - // Attributes: Extra user event features to include in the - // recommendation model. These attributes must NOT contain data that - // needs to be parsed or processed further, e.g. JSON or other - // encodings. If you provide custom attributes for ingested user events, - // also include them in the user events that you associate with - // prediction requests. Custom attribute formatting must be consistent - // between imported events and events provided with prediction requests. - // This lets the Discovery Engine API use those custom attributes when - // training models and serving predictions, which helps improve - // recommendation quality. This field needs to pass all below criteria, - // otherwise an `INVALID_ARGUMENT` error is returned: * The key must be - // a UTF-8 encoded string with a length limit of 5,000 characters. * For - // text attributes, at most 400 values are allowed. Empty values are not - // allowed. Each value must be a UTF-8 encoded string with a length - // limit of 256 characters. * For number attributes, at most 400 values - // are allowed. For product recommendations, an example of extra user - // information is `traffic_channel`, which is how a user arrives at the - // site. Users can arrive at the site by coming to the site directly, - // coming through Google search, or in other ways. - Attributes map[string]GoogleCloudDiscoveryengineV1alphaCustomAttribute `json:"attributes,omitempty"` - - // AttributionToken: Token to attribute an API response to user - // action(s) to trigger the event. Highly recommended for user events - // that are the result of RecommendationService.Recommend. This field - // enables accurate attribution of recommendation model performance. The - // value must be one of: * RecommendResponse.attribution_token for - // events that are the result of RecommendationService.Recommend. * - // SearchResponse.attribution_token for events that are the result of - // SearchService.Search. This token enables us to accurately attribute - // page view or conversion completion back to the event and the - // particular predict response containing this clicked/purchased - // product. If user clicks on product K in the recommendation results, - // pass RecommendResponse.attribution_token as a URL parameter to - // product K's page. When recording events on product K's page, log the - // RecommendResponse.attribution_token to this field. - AttributionToken string `json:"attributionToken,omitempty"` - - // CompletionInfo: CompletionService.CompleteQuery details related to - // the event. This field should be set for `search` event when - // autocomplete function is enabled and the user clicks a suggestion for - // search. - CompletionInfo *GoogleCloudDiscoveryengineV1alphaCompletionInfo `json:"completionInfo,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec: +// The specification for query spell correction. +type GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec struct { + // Mode: The mode under which spell correction should take effect to + // replace the original search query. Default to Mode.AUTO. + // + // Possible values: + // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this + // case, server behavior defaults to Mode.AUTO. + // "SUGGESTION_ONLY" - Search API will try to find a spell suggestion + // if there is any and put in the SearchResponse.corrected_query. The + // spell suggestion will not be used as the search query. + // "AUTO" - Automatic spell correction built by the Search API. Search + // will be based on the corrected query if found. + Mode string `json:"mode,omitempty"` - // DirectUserRequest: Should set to true if the request is made directly - // from the end user, in which case the UserEvent.user_info.user_agent - // can be populated from the HTTP request. This flag should be set only - // if the API request is made directly from the end user such as a - // mobile app (and not if a gateway or a server is processing and - // pushing the user events). This should not be set when using the - // JavaScript tag in UserEventService.CollectUserEvent. - DirectUserRequest bool `json:"directUserRequest,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") 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:"-"` - // Documents: List of Documents associated with this user event. This - // field is optional except for the following event types: * `view-item` - // * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a - // `search` event, this field represents the documents returned to the - // end user on the current page (the end user may have not finished - // browsing the whole page yet). When a new page is returned to the end - // user, after pagination/filtering/ordering even for the same query, a - // new `search` event with different UserEvent.documents is desired. - Documents []*GoogleCloudDiscoveryengineV1alphaDocumentInfo `json:"documents,omitempty"` + // NullFields is a list of field names (e.g. "Mode") 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:"-"` +} - // EventTime: Only required for UserEventService.ImportUserEvents - // method. Timestamp of when the user event happened. - EventTime string `json:"eventTime,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // EventType: Required. User event type. Allowed values are: Generic - // values: * `search`: Search for Documents. * `view-item`: Detailed - // page view of a Document. * `view-item-list`: View of a panel or - // ordered list of Documents. * `view-home-page`: View of the home page. - // * `view-category-page`: View of a category page, e.g. Home > Men > - // Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, - // e.g. in Retail online shopping * `purchase`: Purchase an item(s) - // Media-related values: * `media-play`: Start/resume watching a video, - // playing a song, etc. * `media-complete`: Finished or stopped midway - // through a video, song, etc. - EventType string `json:"eventType,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponse: Response message for +// SearchService.Search method. +type GoogleCloudDiscoveryengineV1alphaSearchResponse struct { + // AppliedControls: Controls applied as part of the Control service. + AppliedControls []string `json:"appliedControls,omitempty"` - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents - // being filtered. One example is for `search` events, the associated - // SearchRequest may contain a filter expression in SearchRequest.filter - // conforming to https://google.aip.dev/160#filtering. Similarly, for - // `view-item-list` events that are generated from a - // RecommendationService.RecommendRequest, this field may be populated - // directly from RecommendationService.RecommendRequest.filter - // conforming to https://google.aip.dev/160#filtering. The value must be - // a UTF-8 encoded string with a length limit of 1,000 characters. - // Otherwise, an `INVALID_ARGUMENT` error is returned. - Filter string `json:"filter,omitempty"` + // AttributionToken: A unique search token. This should be included in + // the UserEvent logs resulting from this search, which enables accurate + // attribution of search model performance. + AttributionToken string `json:"attributionToken,omitempty"` - // MediaInfo: Media-specific info. - MediaInfo *GoogleCloudDiscoveryengineV1alphaMediaInfo `json:"mediaInfo,omitempty"` + // CorrectedQuery: Contains the spell corrected query, if found. If the + // spell correction type is AUTOMATIC, then the search results are based + // on corrected_query. Otherwise the original query is used for search. + CorrectedQuery string `json:"correctedQuery,omitempty"` - // PageInfo: Page metadata such as categories and other critical - // information for certain event types such as `view-category-page`. - PageInfo *GoogleCloudDiscoveryengineV1alphaPageInfo `json:"pageInfo,omitempty"` + // Facets: Results of facets requested by user. + Facets []*GoogleCloudDiscoveryengineV1alphaSearchResponseFacet `json:"facets,omitempty"` - // Panel: Panel metadata associated with this user event. - Panel *GoogleCloudDiscoveryengineV1alphaPanelInfo `json:"panel,omitempty"` + GeoSearchDebugInfo []*GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo `json:"geoSearchDebugInfo,omitempty"` - // PromotionIds: The promotion IDs if this is an event associated with - // promotions. Currently, this field is restricted to at most one ID. - PromotionIds []string `json:"promotionIds,omitempty"` + // GuidedSearchResult: Guided search result. + GuidedSearchResult *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult `json:"guidedSearchResult,omitempty"` - // SearchInfo: SearchService.Search details related to the event. This - // field should be set for `search` event. - SearchInfo *GoogleCloudDiscoveryengineV1alphaSearchInfo `json:"searchInfo,omitempty"` + // NextPageToken: A token that can be sent as SearchRequest.page_token + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // SessionId: A unique identifier for tracking a visitor session with a - // length limit of 128 bytes. A session is an aggregation of an end user - // behavior in a time span. A general guideline to populate the - // session_id: 1. If user has no activity for 30 min, a new session_id - // should be assigned. 2. The session_id should be unique across users, - // suggest use uuid or add UserEvent.user_pseudo_id as prefix. - SessionId string `json:"sessionId,omitempty"` + // QueryExpansionInfo: Query expansion information for the returned + // results. + QueryExpansionInfo *GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo `json:"queryExpansionInfo,omitempty"` - // TagIds: A list of identifiers for the independent experiment groups - // this user event belongs to. This is used to distinguish between user - // events associated with different experiment setups on the customer - // end. - TagIds []string `json:"tagIds,omitempty"` + // RedirectUri: The URI of a customer-defined redirect page. If redirect + // action is triggered, no search is performed, and only redirect_uri + // and attribution_token are set in the response. + RedirectUri string `json:"redirectUri,omitempty"` - // TransactionInfo: The transaction metadata (if any) associated with - // this user event. - TransactionInfo *GoogleCloudDiscoveryengineV1alphaTransactionInfo `json:"transactionInfo,omitempty"` + // Results: A list of matched documents. The order represents the + // ranking. + Results []*GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult `json:"results,omitempty"` - // UserInfo: Information about the end user. - UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` + // Summary: A summary as part of the search results. This field is only + // returned if SearchRequest.ContentSearchSpec.summary_spec is set. + Summary *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary `json:"summary,omitempty"` - // UserPseudoId: Required. A unique identifier for tracking visitors. - // For example, this could be implemented with an HTTP cookie, which - // should be able to uniquely identify a visitor on a single device. - // This unique identifier should not change if the visitor log in/out of - // the website. Do not set the field to the same fixed ID for different - // users. This mixes the event history of those users together, which - // results in degraded model quality. The field must be a UTF-8 encoded - // string with a length limit of 128 characters. Otherwise, an - // `INVALID_ARGUMENT` error is returned. The field should not contain - // PII or user-data. We recommend to use Google Analytics Client ID - // (https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - // for this field. - UserPseudoId string `json:"userPseudoId,omitempty"` + // TotalSize: The estimated total count of matched items irrespective of + // pagination. The count of results returned by pagination may be less + // than the total_size that matches. + TotalSize int64 `json:"totalSize,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Attributes") to + // ForceSendFields is a list of field names (e.g. "AppliedControls") 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 @@ -5666,51 +5631,80 @@ type GoogleCloudDiscoveryengineV1alphaUserEvent struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attributes") 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. "AppliedControls") 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 *GoogleCloudDiscoveryengineV1alphaUserEvent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaUserEvent +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaUserInfo: Information of an end -// user. -type GoogleCloudDiscoveryengineV1alphaUserInfo struct { - // UserAgent: User agent as included in the HTTP header. The field must - // be a UTF-8 encoded string with a length limit of 1,000 characters. - // Otherwise, an `INVALID_ARGUMENT` error is returned. This should not - // be set when using the client side event reporting with GTM or - // JavaScript tag in UserEventService.CollectUserEvent or if - // UserEvent.direct_user_request is set. - UserAgent string `json:"userAgent,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseFacet: A facet result. +type GoogleCloudDiscoveryengineV1alphaSearchResponseFacet struct { + // DynamicFacet: Whether the facet is dynamically generated. + DynamicFacet bool `json:"dynamicFacet,omitempty"` - // UserId: Highly recommended for logged-in users. Unique identifier for - // logged-in user, such as a user name. Don't set for anonymous users. - // Always use a hashed value for this ID. Don't set the field to the - // same fixed ID for different users. This mixes the event history of - // those users together, which results in degraded model quality. The - // field must be a UTF-8 encoded string with a length limit of 128 - // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - UserId string `json:"userId,omitempty"` + // Key: The key for this facet. E.g., "colors" or "price". It matches + // SearchRequest.FacetSpec.FacetKey.key. + Key string `json:"key,omitempty"` - // ForceSendFields is a list of field names (e.g. "UserAgent") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any + // Values: The facet values for this field. + Values []*GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DynamicFacet") 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. "UserAgent") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "DynamicFacet") 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 *GoogleCloudDiscoveryengineV1alphaSearchResponseFacet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseFacet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue: A +// facet value which contains value names and their count. +type GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue struct { + // Count: Number of items that have this facet value. + Count int64 `json:"count,omitempty,string"` + + // Interval: Interval value for a facet, such as 10, 20) for facet + // "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals. + Interval *GoogleCloudDiscoveryengineV1alphaInterval `json:"interval,omitempty"` + + // Value: Text value of a facet, such as "Black" for facet "colors". + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Count") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -5718,29 +5712,24 @@ type GoogleCloudDiscoveryengineV1alphaUserInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaUserInfo +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest: Request -// message for WidgetService.WidgetCompleteQuery method. -type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest struct { - // AdditionalParams: Additional params for security and privacy - // enhancement. - AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` - - // CompleteQueryRequest: Required. The CompleteQuery request to perform - // auto-complete suggestion query. - CompleteQueryRequest *GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest `json:"completeQueryRequest,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo: +// Debug information specifically related to forward geocoding issues +// arising from Geolocation Search. +type GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo struct { + // ErrorMessage: The error produced. + ErrorMessage string `json:"errorMessage,omitempty"` - // ConfigId: Required. The UUID of the WidgetConfig. This field is used - // to identify the widget configuration, set of models used to make the - // auto complete query. - ConfigId string `json:"configId,omitempty"` + // OriginalAddressQuery: The address from which forward geocoding + // ingestion produced issues. + OriginalAddressQuery string `json:"originalAddressQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalParams") to + // ForceSendFields is a list of field names (e.g. "ErrorMessage") 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 @@ -5748,7 +5737,41 @@ type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalParams") to + // NullFields is a list of field names (e.g. "ErrorMessage") 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 *GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult: +// Guided search result. The guided search helps user to refine the +// search results and narrow down to the real needs from a broaded +// search results. +type GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult struct { + // FollowUpQuestions: Suggested follow-up questions. + FollowUpQuestions []string `json:"followUpQuestions,omitempty"` + + // RefinementAttributes: A list of ranked refinement attributes. + RefinementAttributes []*GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute `json:"refinementAttributes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FollowUpQuestions") + // 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. "FollowUpQuestions") 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 @@ -5758,28 +5781,24 @@ type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse: -// Response message for WidgetService.WidgetCompleteQuery method. -type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse struct { - // UToken: The token in response. - UToken string `json:"uToken,omitempty"` - - // WidgetQuerySuggestions: Results of the matched query suggestions in - // widget. The result list is ordered and the first result is a top - // suggestion. - WidgetQuerySuggestions []*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion `json:"widgetQuerySuggestions,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefin +// ementAttribute: Useful attribute for search result refinements. +type GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute struct { + // AttributeKey: Attribute key used to refine the results e.g. + // 'movie_type'. + AttributeKey string `json:"attributeKey,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // AttributeValue: Attribute value used to refine the results e.g. + // 'drama'. + AttributeValue string `json:"attributeValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "UToken") to + // ForceSendFields is a list of field names (e.g. "AttributeKey") 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 @@ -5787,28 +5806,35 @@ type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UToken") 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. "AttributeKey") 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 *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuer -// ySuggestion: Suggestions as search queries. -type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion struct { - // Suggestion: The suggestion for the query. - Suggestion string `json:"suggestion,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo: +// Information describing query expansion including whether expansion +// has occurred. +type GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo struct { + // ExpandedQuery: Bool describing whether query expansion has occurred. + ExpandedQuery bool `json:"expandedQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "Suggestion") to + // PinnedResultCount: Number of pinned results. This field will only be + // set when expansion happens and + // SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to + // true. + PinnedResultCount int64 `json:"pinnedResultCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ExpandedQuery") 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 @@ -5816,150 +5842,100 @@ type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySugg // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Suggestion") 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. "ExpandedQuery") 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 *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConfig: WidgetConfig captures -// configs at the Widget level. -type GoogleCloudDiscoveryengineV1alphaWidgetConfig struct { - // AllowPublicAccess: Whether allow no-auth integration with widget. If - // set true, public access to search or other solutions from widget is - // allowed without authenication token provided by customer hosted - // backend server. - AllowPublicAccess bool `json:"allowPublicAccess,omitempty"` - - // AllowlistedDomains: Allowlisted domains that can load this widget. - AllowlistedDomains []string `json:"allowlistedDomains,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult: +// Represents the search results. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult struct { + // Document: The document data snippet in the search response. Only + // fields that are marked as retrievable are populated. + Document *GoogleCloudDiscoveryengineV1alphaDocument `json:"document,omitempty"` - // ConfigId: Output only. Unique obfuscated identifier of a - // WidgetConfig. - ConfigId string `json:"configId,omitempty"` + // Id: Document.id of the searched Document. + Id string `json:"id,omitempty"` - // ContentSearchSpec: The content search spec that configs the desired - // behavior of content search. - ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // ModelScores: Google provided available scores. + ModelScores map[string]GoogleCloudDiscoveryengineV1alphaDoubleList `json:"modelScores,omitempty"` - // CreateTime: Output only. Timestamp the WidgetConfig was created. - CreateTime string `json:"createTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "Document") 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:"-"` - // DataStoreType: Output only. The type of the parent data store. - // - // Possible values: - // "DATA_STORE_TYPE_UNSPECIFIED" - Unspecified data store type. - // "SITE_SEARCH" - The parent data store contains a site search - // engine. - // "STRUCTURED" - The parent data store contains a search engine for - // structured data. - // "UNSTRUCTURED" - The parent data store contains a search engine for - // unstructured data. - DataStoreType string `json:"dataStoreType,omitempty"` + // NullFields is a list of field names (e.g. "Document") 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:"-"` +} - // DisplayName: Required. The human readable widget config display name. - // Used in Discovery UI. This field must be a UTF-8 encoded string with - // a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT - // error is returned. - DisplayName string `json:"displayName,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // EnableAutocomplete: Whether or not to enable autocomplete. - EnableAutocomplete bool `json:"enableAutocomplete,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseSummary: Summary of +// the top N search result specified by the summary spec. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { + // SafetyAttributes: A collection of Safety Attribute categories and + // their associated confidence scores. + SafetyAttributes *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes `json:"safetyAttributes,omitempty"` - // EnableConversationalSearch: Whether to allow conversational search - // (LLM, multi-turn) or not (non-LLM, single-turn). - EnableConversationalSearch bool `json:"enableConversationalSearch,omitempty"` - - // EnableQualityFeedback: Turn on or off collecting the search result - // quality feedback from end users. - EnableQualityFeedback bool `json:"enableQualityFeedback,omitempty"` - - // EnableResultScore: Whether to show the result score. - EnableResultScore bool `json:"enableResultScore,omitempty"` - - // EnableSafeSearch: Whether to enable safe search. - EnableSafeSearch bool `json:"enableSafeSearch,omitempty"` - - // EnableSnippetResultSummary: Turn on or off summary for each snippets - // result. - EnableSnippetResultSummary bool `json:"enableSnippetResultSummary,omitempty"` - - // EnableSummarization: Turn on or off summarization for the search - // response. - EnableSummarization bool `json:"enableSummarization,omitempty"` - - // FacetField: The configuration and appearance of facets in the end - // user view. - FacetField []*GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField `json:"facetField,omitempty"` - - // FieldsUiComponentsMap: The key is the UI component. Mock. Currently - // supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, - // `custom3`. The value is the name of the field along with its device - // visibility. The 3 custom fields are optional and can be added or - // removed. `title`, `thumbnail`, `url` are required UI components that - // cannot be removed. - FieldsUiComponentsMap map[string]GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField `json:"fieldsUiComponentsMap,omitempty"` - - // LlmEnabled: Output only. Whether LLM is enabled in the corresponding - // data store. - LlmEnabled bool `json:"llmEnabled,omitempty"` - - // MinimumDataTermAccepted: Output only. Whether the customer accepted - // data use terms. - MinimumDataTermAccepted bool `json:"minimumDataTermAccepted,omitempty"` - - // Name: Immutable. The full resource name of the widget config. Format: - // `projects/{project}/locations/{location}/collections/{collection_id}/d - // ataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This - // field must be a UTF-8 encoded string with a length limit of 1024 - // characters. - Name string `json:"name,omitempty"` - - // ResultDisplayType: The type of snippet to display in UCS widget. - - // RESULT_DISPLAY_TYPE_UNSPECIFIED for existing users. - SNIPPET for new - // non-enterprise search users. - EXTRACTIVE_ANSWER for new enterprise - // search users. - // - // Possible values: - // "RESULT_DISPLAY_TYPE_UNSPECIFIED" - Unspecified display type - // (default to showing snippet). - // "SNIPPET" - Display results from the snippet field. - // "EXTRACTIVE_ANSWER" - Display results from extractive answers - // field. - ResultDisplayType string `json:"resultDisplayType,omitempty"` - - // SolutionType: Required. Immutable. Specifies the solution type that - // this WidgetConfig can be used for. + // SummarySkippedReasons: Additional summary-skipped reasons. This + // provides the reason for ignored cases. If nothing is skipped, this + // field is not set. // // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative - // AI agent. - SolutionType string `json:"solutionType,omitempty"` + // "SUMMARY_SKIPPED_REASON_UNSPECIFIED" - Default value. The summary + // skipped reason is not specified. + // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. + // Only populated when SummarySpec.ignore_adversarial_query is set to + // `true`. + // "NON_SUMMARY_SEEKING_QUERY_IGNORED" - The non-summary seeking query + // ignored case. Only populated when + // SummarySpec.ignore_non_summary_seeking_query is set to `true`. + // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored + // case. Google skips the summary if there are no high-relevance search + // results. For example, the data store contains facts about company A + // but the user query is asking questions about company B. + // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. + // Google skips the summary if there is a potential policy violation + // detected. This includes content that may be violent or toxic. + // "LLM_ADDON_NOT_ENABLED" - The LLM addon not enabled case. Google + // skips the summary if the LLM addon is not enabled. + SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` - // UpdateTime: Output only. Timestamp the WidgetConfig was updated. - UpdateTime string `json:"updateTime,omitempty"` + // SummaryText: The summary content. + SummaryText string `json:"summaryText,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowPublicAccess") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "SafetyAttributes") 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. "AllowPublicAccess") to + // NullFields is a list of field names (e.g. "SafetyAttributes") 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 @@ -5969,22 +5945,24 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfig +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummary raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField: Facet fields -// that store the mapping of fields to end user widget appearance. -type GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField struct { - // DisplayName: Optional. The field name that end users will see. - DisplayName string `json:"displayName,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes +// : Safety Attribute categories and their associated confidence scores. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes struct { + // Categories: The display names of Safety Attribute categories + // associated with the generated content. Order matches the Scores. + Categories []string `json:"categories,omitempty"` - // Field: Required. Registered field name. The format is `field.abc`. - Field string `json:"field,omitempty"` + // Scores: The confidence scores of the each category, higher value + // means higher confidence. Order matches the Categories. + Scores []float64 `json:"scores,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "Categories") 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 @@ -5992,50 +5970,66 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") 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. "Categories") 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 *GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField: Facet -// field that maps to a UI Component. -type GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField struct { - // DeviceVisibility: The field visibility on different types of devices. +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes + var s1 struct { + Scores []gensupport.JSONFloat64 `json:"scores"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Scores = make([]float64, len(s1.Scores)) + for i := range s1.Scores { + s.Scores[i] = float64(s1.Scores[i]) + } + return nil +} + +// GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo: Verification +// information for target sites in advanced site search. +type GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo struct { + // SiteVerificationState: Site verification state indicating the + // ownership and validity. // // Possible values: - // "DEVICE_VISIBILITY_UNSPECIFIED" - Default value when not specified. - // Server returns INVALID_ARGUMENT if used in requests. - // "MOBILE" - The UI component is visible on Mobile devices. - // "DESKTOP" - The UI component is visible on Browser-based client. - DeviceVisibility []string `json:"deviceVisibility,omitempty"` - - // DisplayTemplate: The template to customize how the field is - // displayed. An example value would be a string that looks like: - // "Price: {value}". - DisplayTemplate string `json:"displayTemplate,omitempty"` + // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. + // "VERIFIED" - Site ownership verified. + // "UNVERIFIED" - Site ownership pending verification or verification + // failed. + // "EXEMPTED" - Site exempt from verification, e.g. a public website + // that opens to all. + SiteVerificationState string `json:"siteVerificationState,omitempty"` - // Field: Required. Registered field name. The format is `field.abc`. - Field string `json:"field,omitempty"` + // VerifyTime: Latest site verification time. + VerifyTime string `json:"verifyTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeviceVisibility") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "SiteVerificationState") 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. "DeviceVisibility") to + // NullFields is a list of field names (e.g. "SiteVerificationState") 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 @@ -6045,77 +6039,74 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField +func (s *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest: -// Request message for WidgetService.WidgetConverseConversation method. -type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest struct { - // AdditionalParams: Additional params for security and privacy - // enhancement. - AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` - - // ConfigId: Required. The UUID of the WidgetConfig. This field is used - // to identify the widget configuration, set of models used to make the - // user event collection. - ConfigId string `json:"configId,omitempty"` +// GoogleCloudDiscoveryengineV1alphaTargetSite: A target site for the +// SiteSearchEngine. +type GoogleCloudDiscoveryengineV1alphaTargetSite struct { + // ExactMatch: Input only. If set to false, a uri_pattern is generated + // to include all pages whose address contains the provided_uri_pattern. + // If set to true, an uri_pattern is generated to try to be an exact + // match of the provided_uri_pattern or just the specific page if the + // provided_uri_pattern is a specific one. provided_uri_pattern is + // always normalized to generate the URI pattern to be used by the + // search engine. + ExactMatch bool `json:"exactMatch,omitempty"` - // ConversationId: The id of the Conversation to get. Use "-" to - // activate auto session mode, which automatically creates a new - // conversation inside a ConverseConversation session. - ConversationId string `json:"conversationId,omitempty"` + // FailureReason: Output only. Failure reason. + FailureReason *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason `json:"failureReason,omitempty"` - // ConverseConversationRequest: Required. The - // ConverseConversationRequest request to perform converse a - // conversation. The ServingConfig id will be `default_search` by - // default. - ConverseConversationRequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest `json:"converseConversationRequest,omitempty"` + // GeneratedUriPattern: Output only. This is system-generated based on + // the provided_uri_pattern. + GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalParams") 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:"-"` + // IndexingStatus: Output only. Indexing status. + // + // Possible values: + // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. + // "PENDING" - The target site is in the update queue and will be + // picked up by indexing pipeline. + // "FAILED" - The target site fails to be indexed. + // "SUCCEEDED" - The target site has been indexed. + // "DELETING" - The previously indexed target site has been marked to + // be deleted. This is a transitioning state which will resulted in + // either: 1. target site deleted if unindexing is successful; 2. state + // reverts to SUCCEEDED if the unindexing fails. + IndexingStatus string `json:"indexingStatus,omitempty"` - // NullFields is a list of field names (e.g. "AdditionalParams") 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 *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Name: Output only. The fully qualified resource name of the target + // site. + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/siteSearchEngine/targetSites/{target_site}` The + // `target_site_id` is system-generated. + Name string `json:"name,omitempty"` -// GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse: -// Response message for WidgetService.WidgetConverseConversation method. -type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse struct { - // ConversationId: The id of the Conversation returned. - ConversationId string `json:"conversationId,omitempty"` + // ProvidedUriPattern: Required. Input only. The user provided URI + // pattern from which the `generated_uri_pattern` is generated. + ProvidedUriPattern string `json:"providedUriPattern,omitempty"` - // ConverseConversationResponse: ConverseConversationResponse returned - // from ConversationalSearchService.ConverseConversation. - ConverseConversationResponse *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse `json:"converseConversationResponse,omitempty"` + // SiteVerificationInfo: Output only. Site ownership and validity + // verification status. + SiteVerificationInfo *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` - // UToken: The token in response. - UToken string `json:"uToken,omitempty"` + // Type: The type of the target site, e.g. whether the site is to be + // included or excluded. + // + // Possible values: + // "TYPE_UNSPECIFIED" - This value is unused. In this case, server + // behavior defaults to Type.INCLUDE. + // "INCLUDE" - Include the target site. + // "EXCLUDE" - Exclude the target site. + Type string `json:"type,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // UpdateTime: Output only. The target site's last updated time. + UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConversationId") to + // ForceSendFields is a list of field names (e.g. "ExactMatch") 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 @@ -6123,38 +6114,28 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse struct // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConversationId") 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. "ExactMatch") 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 *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse +func (s *GoogleCloudDiscoveryengineV1alphaTargetSite) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSite raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest: Request message -// for WidgetService.WidgetSearch method. -type GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest struct { - // AdditionalParams: Additional params for security and privacy - // enhancement. - AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` - - // ConfigId: Required. The UUID of the Search WidgetConfig. This field - // is used to identify the search widget configuration, set of models - // used to make the search. - ConfigId string `json:"configId,omitempty"` - - // SearchRequest: Required. The search request to perform search. - SearchRequest *GoogleCloudDiscoveryengineV1alphaSearchRequest `json:"searchRequest,omitempty"` +// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason: Site search +// indexing failure reasons. +type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason struct { + // QuotaFailure: Failed due to insufficient quota. + QuotaFailure *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalParams") to + // ForceSendFields is a list of field names (e.g. "QuotaFailure") 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 @@ -6162,36 +6143,33 @@ type GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalParams") 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. "QuotaFailure") 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 *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest +func (s *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse: Response -// message for WidgetService.WidgetSearch method. -type GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse struct { - // SearchResponse: The search response after performing search. - SearchResponse *GoogleCloudDiscoveryengineV1alphaSearchResponse `json:"searchResponse,omitempty"` +type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure struct { +} - // UToken: The token in response. - UToken string `json:"uToken,omitempty"` +// GoogleCloudDiscoveryengineV1alphaTextInput: Defines text input. +type GoogleCloudDiscoveryengineV1alphaTextInput struct { + // Context: Conversation context of the input. + Context *GoogleCloudDiscoveryengineV1alphaConversationContext `json:"context,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Input: Text input. + Input string `json:"input,omitempty"` - // ForceSendFields is a list of field names (e.g. "SearchResponse") to + // ForceSendFields is a list of field names (e.g. "Context") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6199,33 +6177,56 @@ type GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SearchResponse") 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. "Context") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse +func (s *GoogleCloudDiscoveryengineV1alphaTextInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTextInput raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for -// Create Schema LRO. -type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaTransactionInfo: A transaction +// represents the entire purchase transaction. +type GoogleCloudDiscoveryengineV1alphaTransactionInfo struct { + // Cost: All the costs associated with the products. These can be + // manufacturing costs, shipping expenses not borne by the end user, or + // any other costs, such that: * Profit = value - tax - cost + Cost float64 `json:"cost,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Currency: Required. Currency code. Use three-character ISO-4217 code. + Currency string `json:"currency,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // DiscountValue: The total discount(s) value applied to this + // transaction. This figure should be excluded from + // TransactionInfo.value For example, if a user paid + // TransactionInfo.value amount, then nominal (pre-discount) value of + // the transaction is the sum of TransactionInfo.value and + // TransactionInfo.discount_value This means that profit is calculated + // the same way, regardless of the discount value, and that + // TransactionInfo.discount_value can be larger than + // TransactionInfo.value: * Profit = value - tax - cost + DiscountValue float64 `json:"discountValue,omitempty"` + + // Tax: All the taxes associated with the transaction. + Tax float64 `json:"tax,omitempty"` + + // TransactionId: The transaction ID with a length limit of 128 + // characters. + TransactionId string `json:"transactionId,omitempty"` + + // Value: Required. Total non-zero value associated with the + // transaction. This value may include shipping, tax, or other + // adjustments to the total value that you want to include. + Value float64 `json:"value,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 // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6233,8 +6234,8 @@ type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { // 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 + // NullFields is a list of field names (e.g. "Cost") 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. @@ -6242,23 +6243,42 @@ type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaTransactionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTransactionInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for -// DeleteSchema LRO. -type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaTransactionInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaTransactionInfo + var s1 struct { + Cost gensupport.JSONFloat64 `json:"cost"` + DiscountValue gensupport.JSONFloat64 `json:"discountValue"` + Tax gensupport.JSONFloat64 `json:"tax"` + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Cost = float64(s1.Cost) + s.DiscountValue = float64(s1.DiscountValue) + s.Tax = float64(s1.Tax) + s.Value = float64(s1.Value) + return nil +} - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata: Metadata +// associated with a tune operation. +type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { + // Engine: Required. The resource name of the engine that this tune + // applies to. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collec + // tion_id}/engines/{engine_id}` + Engine string `json:"engine,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Engine") 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 @@ -6266,8 +6286,8 @@ type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { // 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 + // NullFields is a list of field names (e.g. "Engine") 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. @@ -6275,25 +6295,28 @@ type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata -// related to the progress of the ImportDocuments operation. This is -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaTuneEngineRequest: Request to +// manually start a tuning process now (instead of waiting for the +// periodically scheduled tuning to happen). +type GoogleCloudDiscoveryengineV1alphaTuneEngineRequest struct { +} - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaTuneEngineResponse: Response +// associated with a tune operation. +type GoogleCloudDiscoveryengineV1alphaTuneEngineResponse struct { +} - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for +// UpdateSchema LRO. +type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` // UpdateTime: Operation last update time. If the operation is done, // this is also the finish time. @@ -6316,27 +6339,165 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of -// the ImportDocumentsRequest. If the long running operation is done, -// then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the - // request if set. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaUserEvent: UserEvent captures all +// metadata information Discovery Engine API needs to know about how end +// users interact with customers' website. +type GoogleCloudDiscoveryengineV1alphaUserEvent struct { + // Attributes: Extra user event features to include in the + // recommendation model. These attributes must NOT contain data that + // needs to be parsed or processed further, e.g. JSON or other + // encodings. If you provide custom attributes for ingested user events, + // also include them in the user events that you associate with + // prediction requests. Custom attribute formatting must be consistent + // between imported events and events provided with prediction requests. + // This lets the Discovery Engine API use those custom attributes when + // training models and serving predictions, which helps improve + // recommendation quality. This field needs to pass all below criteria, + // otherwise an `INVALID_ARGUMENT` error is returned: * The key must be + // a UTF-8 encoded string with a length limit of 5,000 characters. * For + // text attributes, at most 400 values are allowed. Empty values are not + // allowed. Each value must be a UTF-8 encoded string with a length + // limit of 256 characters. * For number attributes, at most 400 values + // are allowed. For product recommendations, an example of extra user + // information is `traffic_channel`, which is how a user arrives at the + // site. Users can arrive at the site by coming to the site directly, + // coming through Google search, or in other ways. + Attributes map[string]GoogleCloudDiscoveryengineV1alphaCustomAttribute `json:"attributes,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // AttributionToken: Token to attribute an API response to user + // action(s) to trigger the event. Highly recommended for user events + // that are the result of RecommendationService.Recommend. This field + // enables accurate attribution of recommendation model performance. The + // value must be one of: * RecommendResponse.attribution_token for + // events that are the result of RecommendationService.Recommend. * + // SearchResponse.attribution_token for events that are the result of + // SearchService.Search. This token enables us to accurately attribute + // page view or conversion completion back to the event and the + // particular predict response containing this clicked/purchased + // product. If user clicks on product K in the recommendation results, + // pass RecommendResponse.attribution_token as a URL parameter to + // product K's page. When recording events on product K's page, log the + // RecommendResponse.attribution_token to this field. + AttributionToken string `json:"attributionToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // CompletionInfo: CompletionService.CompleteQuery details related to + // the event. This field should be set for `search` event when + // autocomplete function is enabled and the user clicks a suggestion for + // search. + CompletionInfo *GoogleCloudDiscoveryengineV1alphaCompletionInfo `json:"completionInfo,omitempty"` + + // DirectUserRequest: Should set to true if the request is made directly + // from the end user, in which case the UserEvent.user_info.user_agent + // can be populated from the HTTP request. This flag should be set only + // if the API request is made directly from the end user such as a + // mobile app (and not if a gateway or a server is processing and + // pushing the user events). This should not be set when using the + // JavaScript tag in UserEventService.CollectUserEvent. + DirectUserRequest bool `json:"directUserRequest,omitempty"` + + // Documents: List of Documents associated with this user event. This + // field is optional except for the following event types: * `view-item` + // * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a + // `search` event, this field represents the documents returned to the + // end user on the current page (the end user may have not finished + // browsing the whole page yet). When a new page is returned to the end + // user, after pagination/filtering/ordering even for the same query, a + // new `search` event with different UserEvent.documents is desired. + Documents []*GoogleCloudDiscoveryengineV1alphaDocumentInfo `json:"documents,omitempty"` + + // EventTime: Only required for UserEventService.ImportUserEvents + // method. Timestamp of when the user event happened. + EventTime string `json:"eventTime,omitempty"` + + // EventType: Required. User event type. Allowed values are: Generic + // values: * `search`: Search for Documents. * `view-item`: Detailed + // page view of a Document. * `view-item-list`: View of a panel or + // ordered list of Documents. * `view-home-page`: View of the home page. + // * `view-category-page`: View of a category page, e.g. Home > Men > + // Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, + // e.g. in Retail online shopping * `purchase`: Purchase an item(s) + // Media-related values: * `media-play`: Start/resume watching a video, + // playing a song, etc. * `media-complete`: Finished or stopped midway + // through a video, song, etc. + EventType string `json:"eventType,omitempty"` + + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. One example is for `search` events, the associated + // SearchRequest may contain a filter expression in SearchRequest.filter + // conforming to https://google.aip.dev/160#filtering. Similarly, for + // `view-item-list` events that are generated from a + // RecommendationService.RecommendRequest, this field may be populated + // directly from RecommendationService.RecommendRequest.filter + // conforming to https://google.aip.dev/160#filtering. The value must be + // a UTF-8 encoded string with a length limit of 1,000 characters. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + Filter string `json:"filter,omitempty"` + + // MediaInfo: Media-specific info. + MediaInfo *GoogleCloudDiscoveryengineV1alphaMediaInfo `json:"mediaInfo,omitempty"` + + // PageInfo: Page metadata such as categories and other critical + // information for certain event types such as `view-category-page`. + PageInfo *GoogleCloudDiscoveryengineV1alphaPageInfo `json:"pageInfo,omitempty"` + + // Panel: Panel metadata associated with this user event. + Panel *GoogleCloudDiscoveryengineV1alphaPanelInfo `json:"panel,omitempty"` + + // PromotionIds: The promotion IDs if this is an event associated with + // promotions. Currently, this field is restricted to at most one ID. + PromotionIds []string `json:"promotionIds,omitempty"` + + // SearchInfo: SearchService.Search details related to the event. This + // field should be set for `search` event. + SearchInfo *GoogleCloudDiscoveryengineV1alphaSearchInfo `json:"searchInfo,omitempty"` + + // SessionId: A unique identifier for tracking a visitor session with a + // length limit of 128 bytes. A session is an aggregation of an end user + // behavior in a time span. A general guideline to populate the + // session_id: 1. If user has no activity for 30 min, a new session_id + // should be assigned. 2. The session_id should be unique across users, + // suggest use uuid or add UserEvent.user_pseudo_id as prefix. + SessionId string `json:"sessionId,omitempty"` + + // TagIds: A list of identifiers for the independent experiment groups + // this user event belongs to. This is used to distinguish between user + // events associated with different experiment setups on the customer + // end. + TagIds []string `json:"tagIds,omitempty"` + + // TransactionInfo: The transaction metadata (if any) associated with + // this user event. + TransactionInfo *GoogleCloudDiscoveryengineV1alphaTransactionInfo `json:"transactionInfo,omitempty"` + + // UserInfo: Information about the end user. + UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` + + // UserPseudoId: Required. A unique identifier for tracking visitors. + // For example, this could be implemented with an HTTP cookie, which + // should be able to uniquely identify a visitor on a single device. + // This unique identifier should not change if the visitor log in/out of + // the website. Do not set the field to the same fixed ID for different + // users. This mixes the event history of those users together, which + // results in degraded model quality. The field must be a UTF-8 encoded + // string with a length limit of 128 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. The field should not contain + // PII or user-data. We recommend to use Google Analytics Client ID + // (https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + // for this field. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Attributes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6344,31 +6505,42 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") 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. "Attributes") 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 *GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaUserEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUserEvent raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of -// destination for Import related errors. -type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { - // GcsPrefix: Cloud Storage prefix for import errors. This must be an - // empty, existing Cloud Storage directory. Import errors are written to - // sharded files in this directory, one per line, as a JSON-encoded - // `google.rpc.Status` message. - GcsPrefix string `json:"gcsPrefix,omitempty"` +// GoogleCloudDiscoveryengineV1alphaUserInfo: Information of an end +// user. +type GoogleCloudDiscoveryengineV1alphaUserInfo struct { + // UserAgent: User agent as included in the HTTP header. The field must + // be a UTF-8 encoded string with a length limit of 1,000 characters. + // Otherwise, an `INVALID_ARGUMENT` error is returned. This should not + // be set when using the client side event reporting with GTM or + // JavaScript tag in UserEventService.CollectUserEvent or if + // UserEvent.direct_user_request is set. + UserAgent string `json:"userAgent,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsPrefix") to + // UserId: Highly recommended for logged-in users. Unique identifier for + // logged-in user, such as a user name. Don't set for anonymous users. + // Always use a hashed value for this ID. Don't set the field to the + // same fixed ID for different users. This mixes the event history of + // those users together, which results in degraded model quality. The + // field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + UserId string `json:"userId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UserAgent") 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 @@ -6376,7 +6548,7 @@ type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsPrefix") to include in + // NullFields is a list of field names (e.g. "UserAgent") 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 @@ -6385,31 +6557,29 @@ type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig +func (s *GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUserInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata -// related to the progress of the Import operation. This is returned by -// the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest: Request +// message for WidgetService.WidgetCompleteQuery method. +type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest struct { + // AdditionalParams: Additional params for security and privacy + // enhancement. + AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` + // CompleteQueryRequest: Required. The CompleteQuery request to perform + // auto-complete suggestion query. + CompleteQueryRequest *GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest `json:"completeQueryRequest,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // ConfigId: Required. The UUID of the WidgetConfig. This field is used + // to identify the widget configuration, set of models used to make the + // auto complete query. + ConfigId string `json:"configId,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "AdditionalParams") 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 @@ -6417,44 +6587,38 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { // 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 is a list of field names (e.g. "AdditionalParams") 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 *GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of -// the ImportUserEventsRequest. If the long running operation was -// successful, then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors if this - // field was set in the request. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse: +// Response message for WidgetService.WidgetCompleteQuery method. +type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse struct { + // UToken: The token in response. + UToken string `json:"uToken,omitempty"` - // JoinedEventsCount: Count of user events imported with complete - // existing Documents. - JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + // WidgetQuerySuggestions: Results of the matched query suggestions in + // widget. The result list is ordered and the first result is a top + // suggestion. + WidgetQuerySuggestions []*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion `json:"widgetQuerySuggestions,omitempty"` - // UnjoinedEventsCount: Count of user events imported, but with Document - // information not found in the existing Branch. - UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // ForceSendFields is a list of field names (e.g. "UToken") 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 @@ -6462,40 +6626,28 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") 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. "UToken") 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 *GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse +func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata -// related to the progress of the PurgeDocuments operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - - // SuccessCount: Count of entries that were deleted successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuer +// ySuggestion: Suggestions as search queries. +type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion struct { + // Suggestion: The suggestion for the query. + Suggestion string `json:"suggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Suggestion") 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 @@ -6503,7 +6655,7 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { // 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 + // NullFields is a list of field names (e.g. "Suggestion") 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 @@ -6512,66 +6664,166 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse: Response -// message for DocumentService.PurgeDocuments method. If the long -// running operation is successfully done, then this message is returned -// by the google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { - // PurgeCount: The total count of documents purged as a result of the - // operation. - PurgeCount int64 `json:"purgeCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaWidgetConfig: WidgetConfig captures +// configs at the Widget level. +type GoogleCloudDiscoveryengineV1alphaWidgetConfig struct { + // AllowPublicAccess: Whether allow no-auth integration with widget. If + // set true, public access to search or other solutions from widget is + // allowed without authenication token provided by customer hosted + // backend server. + AllowPublicAccess bool `json:"allowPublicAccess,omitempty"` - // PurgeSample: A sample of document names that will be deleted. Only - // populated if `force` is set to false. A max of 100 names will be - // returned and the names are chosen at random. - PurgeSample []string `json:"purgeSample,omitempty"` + // AllowlistedDomains: Allowlisted domains that can load this widget. + AllowlistedDomains []string `json:"allowlistedDomains,omitempty"` - // ForceSendFields is a list of field names (e.g. "PurgeCount") to - // unconditionally include in API requests. By default, fields with + // ConfigId: Output only. Unique obfuscated identifier of a + // WidgetConfig. + ConfigId string `json:"configId,omitempty"` + + // ContentSearchSpec: The content search spec that configs the desired + // behavior of content search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + + // CreateTime: Output only. Timestamp the WidgetConfig was created. + CreateTime string `json:"createTime,omitempty"` + + // DataStoreType: Output only. The type of the parent data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Unspecified data store type. + // "SITE_SEARCH" - The parent data store contains a site search + // engine. + // "STRUCTURED" - The parent data store contains a search engine for + // structured data. + // "UNSTRUCTURED" - The parent data store contains a search engine for + // unstructured data. + DataStoreType string `json:"dataStoreType,omitempty"` + + // DisplayName: Required. The human readable widget config display name. + // Used in Discovery UI. This field must be a UTF-8 encoded string with + // a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT + // error is returned. + DisplayName string `json:"displayName,omitempty"` + + // EnableAutocomplete: Whether or not to enable autocomplete. + EnableAutocomplete bool `json:"enableAutocomplete,omitempty"` + + // EnableConversationalSearch: Whether to allow conversational search + // (LLM, multi-turn) or not (non-LLM, single-turn). + EnableConversationalSearch bool `json:"enableConversationalSearch,omitempty"` + + // EnableQualityFeedback: Turn on or off collecting the search result + // quality feedback from end users. + EnableQualityFeedback bool `json:"enableQualityFeedback,omitempty"` + + // EnableResultScore: Whether to show the result score. + EnableResultScore bool `json:"enableResultScore,omitempty"` + + // EnableSafeSearch: Whether to enable safe search. + EnableSafeSearch bool `json:"enableSafeSearch,omitempty"` + + // EnableSnippetResultSummary: Turn on or off summary for each snippets + // result. + EnableSnippetResultSummary bool `json:"enableSnippetResultSummary,omitempty"` + + // EnableSummarization: Turn on or off summarization for the search + // response. + EnableSummarization bool `json:"enableSummarization,omitempty"` + + // FacetField: The configuration and appearance of facets in the end + // user view. + FacetField []*GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField `json:"facetField,omitempty"` + + // FieldsUiComponentsMap: The key is the UI component. Mock. Currently + // supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, + // `custom3`. The value is the name of the field along with its device + // visibility. The 3 custom fields are optional and can be added or + // removed. `title`, `thumbnail`, `url` are required UI components that + // cannot be removed. + FieldsUiComponentsMap map[string]GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField `json:"fieldsUiComponentsMap,omitempty"` + + // LlmEnabled: Output only. Whether LLM is enabled in the corresponding + // data store. + LlmEnabled bool `json:"llmEnabled,omitempty"` + + // MinimumDataTermAccepted: Output only. Whether the customer accepted + // data use terms. + MinimumDataTermAccepted bool `json:"minimumDataTermAccepted,omitempty"` + + // Name: Immutable. The full resource name of the widget config. Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/d + // ataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This + // field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + Name string `json:"name,omitempty"` + + // ResultDisplayType: The type of snippet to display in UCS widget. - + // RESULT_DISPLAY_TYPE_UNSPECIFIED for existing users. - SNIPPET for new + // non-enterprise search users. - EXTRACTIVE_ANSWER for new enterprise + // search users. + // + // Possible values: + // "RESULT_DISPLAY_TYPE_UNSPECIFIED" - Unspecified display type + // (default to showing snippet). + // "SNIPPET" - Display results from the snippet field. + // "EXTRACTIVE_ANSWER" - Display results from extractive answers + // field. + ResultDisplayType string `json:"resultDisplayType,omitempty"` + + // SolutionType: Required. Immutable. Specifies the solution type that + // this WidgetConfig can be used for. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + SolutionType string `json:"solutionType,omitempty"` + + // UpdateTime: Output only. Timestamp the WidgetConfig was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowPublicAccess") + // 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. "PurgeCount") 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. "AllowPublicAccess") 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 *GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and -// layout of a type of document data. -type GoogleCloudDiscoveryengineV1betaSchema struct { - // JsonSchema: The JSON representation of the schema. - JsonSchema string `json:"jsonSchema,omitempty"` - - // Name: Immutable. The full resource name of the schema, in the format - // of - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 - // encoded string with a length limit of 1024 characters. - Name string `json:"name,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField: Facet fields +// that store the mapping of fields to end user widget appearance. +type GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField struct { + // DisplayName: Optional. The field name that end users will see. + DisplayName string `json:"displayName,omitempty"` - // StructSchema: The structured representation of the schema. - StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + // Field: Required. Registered field name. The format is `field.abc`. + Field string `json:"field,omitempty"` - // ForceSendFields is a list of field names (e.g. "JsonSchema") to + // ForceSendFields is a list of field names (e.g. "DisplayName") 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 @@ -6579,32 +6831,42 @@ type GoogleCloudDiscoveryengineV1betaSchema struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JsonSchema") 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. "DisplayName") 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 *GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSchema +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for -// UpdateSchema LRO. -type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField: Facet +// field that maps to a UI Component. +type GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField struct { + // DeviceVisibility: The field visibility on different types of devices. + // + // Possible values: + // "DEVICE_VISIBILITY_UNSPECIFIED" - Default value when not specified. + // Server returns INVALID_ARGUMENT if used in requests. + // "MOBILE" - The UI component is visible on Mobile devices. + // "DESKTOP" - The UI component is visible on Browser-based client. + DeviceVisibility []string `json:"deviceVisibility,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // DisplayTemplate: The template to customize how the field is + // displayed. An example value would be a string that looks like: + // "Price: {value}". + DisplayTemplate string `json:"displayTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // Field: Required. Registered field name. The format is `field.abc`. + Field string `json:"field,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceVisibility") 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 @@ -6612,36 +6874,46 @@ type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { // 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 is a list of field names (e.g. "DeviceVisibility") 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 *GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest: +// Request message for WidgetService.WidgetConverseConversation method. +type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest struct { + // AdditionalParams: Additional params for security and privacy + // enhancement. + AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + // ConfigId: Required. The UUID of the WidgetConfig. This field is used + // to identify the widget configuration, set of models used to make the + // user event collection. + ConfigId string `json:"configId,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // ConversationId: The id of the Conversation to get. Use "-" to + // activate auto session mode, which automatically creates a new + // conversation inside a ConverseConversation session. + ConversationId string `json:"conversationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ConverseConversationRequest: Required. The + // ConverseConversationRequest request to perform converse a + // conversation. The ServingConfig id will be `default_search` by + // default. + ConverseConversationRequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest `json:"converseConversationRequest,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalParams") 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 @@ -6649,61 +6921,40 @@ type GoogleLongrunningListOperationsResponse struct { // 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 is a list of field names (e.g. "AdditionalParams") 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 *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a network API call. -type GoogleLongrunningOperation 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 *GoogleRpcStatus `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"` +// GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse: +// Response message for WidgetService.WidgetConverseConversation method. +type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse struct { + // ConversationId: The id of the Conversation returned. + ConversationId string `json:"conversationId,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"` + // ConverseConversationResponse: ConverseConversationResponse returned + // from ConversationalSearchService.ConverseConversation. + ConverseConversationResponse *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse `json:"converseConversationResponse,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"` + // UToken: The token in response. + UToken string `json:"uToken,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 + // ForceSendFields is a list of field names (e.g. "ConversationId") 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 @@ -6711,54 +6962,38 @@ type GoogleLongrunningOperation struct { // 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 is a list of field names (e.g. "ConversationId") 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 *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleProtobufEmpty: A generic empty message that you can re-use to -// avoid defining duplicated empty messages in your APIs. A typical -// example is to use it as the request or the response type of an API -// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) -// returns (google.protobuf.Empty); } -type GoogleProtobufEmpty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - -// GoogleRpcStatus: 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 GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest: Request message +// for WidgetService.WidgetSearch method. +type GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest struct { + // AdditionalParams: Additional params for security and privacy + // enhancement. + AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,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"` + // ConfigId: Required. The UUID of the Search WidgetConfig. This field + // is used to identify the search widget configuration, set of models + // used to make the search. + ConfigId string `json:"configId,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"` + // SearchRequest: Required. The search request to perform search. + SearchRequest *GoogleCloudDiscoveryengineV1alphaSearchRequest `json:"searchRequest,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "AdditionalParams") 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 @@ -6766,94 +7001,3833 @@ type GoogleRpcStatus struct { // 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 is a list of field names (e.g. "AdditionalParams") 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 *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// 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"` +// GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse: Response +// message for WidgetService.WidgetSearch method. +type GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse struct { + // SearchResponse: The search response after performing search. + SearchResponse *GoogleCloudDiscoveryengineV1alphaSearchResponse `json:"searchResponse,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"` + // UToken: The token in response. + UToken string `json:"uToken,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"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "SearchResponse") 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. "SearchResponse") 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 *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for +// Create Schema LRO. +type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for +// DeleteSchema LRO. +type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata +// related to the progress of the ImportDocuments operation. This is +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of +// the ImportDocumentsRequest. If the long running operation is done, +// then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 *GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { + // GcsPrefix: Cloud Storage prefix for import errors. This must be an + // empty, existing Cloud Storage directory. Import errors are written to + // sharded files in this directory, one per line, as a JSON-encoded + // `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPrefix") 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. "GcsPrefix") 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 *GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata +// related to the progress of the Import operation. This is returned by +// the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of +// the ImportUserEventsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this + // field was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // JoinedEventsCount: Count of user events imported with complete + // existing Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 *GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata +// related to the progress of the PurgeDocuments operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse: Response +// message for DocumentService.PurgeDocuments method. If the long +// running operation is successfully done, then this message is returned +// by the google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { + // PurgeCount: The total count of documents purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + + // PurgeSample: A sample of document names that will be deleted. Only + // populated if `force` is set to false. A max of 100 names will be + // returned and the names are chosen at random. + PurgeSample []string `json:"purgeSample,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PurgeCount") 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. "PurgeCount") 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 *GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and +// layout of a type of document data. +type GoogleCloudDiscoveryengineV1betaSchema struct { + // JsonSchema: The JSON representation of the schema. + JsonSchema string `json:"jsonSchema,omitempty"` + + // Name: Immutable. The full resource name of the schema, in the format + // of + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 + // encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // StructSchema: The structured representation of the schema. + StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JsonSchema") 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. "JsonSchema") 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 *GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for +// UpdateSchema LRO. +type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*GoogleLongrunningOperation `json:"operations,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 *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation 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 *GoogleRpcStatus `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 *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to +// avoid defining duplicated empty messages in your APIs. A typical +// example is to use it as the request or the response type of an API +// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) +// returns (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleRpcStatus: 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 GoogleRpcStatus 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 *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// 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) +} + +// method id "discoveryengine.locations.lookupWidgetConfig": + +type LocationsLookupWidgetConfigCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphalookupwidgetconfigrequest *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// LookupWidgetConfig: Gets the Widget Config using the uuid. +// +// - location: The location resource where lookup widget will be +// performed. Format: `locations/{location}`. +func (r *LocationsService) LookupWidgetConfig(location string, googleclouddiscoveryenginev1alphalookupwidgetconfigrequest *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest) *LocationsLookupWidgetConfigCall { + c := &LocationsLookupWidgetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphalookupwidgetconfigrequest = googleclouddiscoveryenginev1alphalookupwidgetconfigrequest + 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 *LocationsLookupWidgetConfigCall) Fields(s ...googleapi.Field) *LocationsLookupWidgetConfigCall { + 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 *LocationsLookupWidgetConfigCall) Context(ctx context.Context) *LocationsLookupWidgetConfigCall { + 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 *LocationsLookupWidgetConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsLookupWidgetConfigCall) 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.googleclouddiscoveryenginev1alphalookupwidgetconfigrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/lookupWidgetConfig") + 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{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.lookupWidgetConfig" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse.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 *LocationsLookupWidgetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse, 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 := &GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse{ + 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 Widget Config using the uuid.", + // "flatPath": "v1alpha/locations/{locationsId}/lookupWidgetConfig", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.lookupWidgetConfig", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where lookup widget will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/lookupWidgetConfig", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.locations.widgetCompleteQuery": + +type LocationsWidgetCompleteQueryCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphawidgetcompletequeryrequest *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// WidgetCompleteQuery: Performs a user input completion with keyword +// suggestion. Similar to the CompletionService.CompleteQuery method, +// but a widget version that allows CompleteQuery without API Key. It +// supports CompleteQuery with or without JWT token. +// +// - location: The location resource where widget complete query will be +// performed. Format: `locations/{location}`. +func (r *LocationsService) WidgetCompleteQuery(location string, googleclouddiscoveryenginev1alphawidgetcompletequeryrequest *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest) *LocationsWidgetCompleteQueryCall { + c := &LocationsWidgetCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphawidgetcompletequeryrequest = googleclouddiscoveryenginev1alphawidgetcompletequeryrequest + 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 *LocationsWidgetCompleteQueryCall) Fields(s ...googleapi.Field) *LocationsWidgetCompleteQueryCall { + 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 *LocationsWidgetCompleteQueryCall) Context(ctx context.Context) *LocationsWidgetCompleteQueryCall { + 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 *LocationsWidgetCompleteQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWidgetCompleteQueryCall) 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.googleclouddiscoveryenginev1alphawidgetcompletequeryrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetCompleteQuery") + 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{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.widgetCompleteQuery" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse.ServerRe +// sponse.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 *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse, 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 := &GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse{ + 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": "Performs a user input completion with keyword suggestion. Similar to the CompletionService.CompleteQuery method, but a widget version that allows CompleteQuery without API Key. It supports CompleteQuery with or without JWT token.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetCompleteQuery", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.widgetCompleteQuery", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where widget complete query will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/widgetCompleteQuery", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.locations.widgetConverseConversation": + +type LocationsWidgetConverseConversationCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// WidgetConverseConversation: Converse a conversation with Widget. +// +// - location: The location resource where widget converse conversation +// will be performed. Format: `locations/{location}`. +func (r *LocationsService) WidgetConverseConversation(location string, googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) *LocationsWidgetConverseConversationCall { + c := &LocationsWidgetConverseConversationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest = googleclouddiscoveryenginev1alphawidgetconverseconversationrequest + 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 *LocationsWidgetConverseConversationCall) Fields(s ...googleapi.Field) *LocationsWidgetConverseConversationCall { + 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 *LocationsWidgetConverseConversationCall) Context(ctx context.Context) *LocationsWidgetConverseConversationCall { + 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 *LocationsWidgetConverseConversationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWidgetConverseConversationCall) 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.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetConverseConversation") + 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{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.widgetConverseConversation" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse.S +// erverResponse.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 *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse, 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 := &GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse{ + 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": "Converse a conversation with Widget.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetConverseConversation", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.widgetConverseConversation", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where widget converse conversation will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/widgetConverseConversation", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.locations.widgetSearch": + +type LocationsWidgetSearchCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// WidgetSearch: Performs a search. Similar to the SearchService.Search +// method, but a widget version that allows search without API Key. It +// supports search with or without JWT token. +// +// - location: The location resource where widget search will be +// performed. Format: `locations/{location}`. +func (r *LocationsService) WidgetSearch(location string, googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) *LocationsWidgetSearchCall { + c := &LocationsWidgetSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphawidgetsearchrequest = googleclouddiscoveryenginev1alphawidgetsearchrequest + 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 *LocationsWidgetSearchCall) Fields(s ...googleapi.Field) *LocationsWidgetSearchCall { + 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 *LocationsWidgetSearchCall) Context(ctx context.Context) *LocationsWidgetSearchCall { + 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 *LocationsWidgetSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWidgetSearchCall) 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.googleclouddiscoveryenginev1alphawidgetsearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetSearch") + 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{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.widgetSearch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse.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 *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse, 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 := &GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse{ + 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": "Performs a search. Similar to the SearchService.Search method, but a widget version that allows search without API Key. It supports search with or without JWT token.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetSearch", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.widgetSearch", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where widget search will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/widgetSearch", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.completeQuery": + +type ProjectsLocationsCollectionsDataStoresCompleteQueryCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// CompleteQuery: Completes the specified user input with keyword +// suggestions. +// +// - dataStore: The parent data store resource name for which the +// completion is performed, such as +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store`. +func (r *ProjectsLocationsCollectionsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c := &ProjectsLocationsCollectionsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + return c +} + +// IncludeTailSuggestions sets the optional parameter +// "includeTailSuggestions": Indicates if tail suggestions should be +// returned if there are no suggestions that match the full query. Even +// if set to true, if there are suggestions that match the full query, +// those are returned and no tail suggestions are returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) + return c +} + +// Query sets the optional parameter "query": Required. The typeahead +// input used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) + return c +} + +// QueryModel sets the optional parameter "queryModel": Selects data +// model of query suggestions for serving. Currently supported values: * +// `document` - Using suggestions generated from user-imported +// documents. * `search-history` - Using suggestions generated from the +// past history of SearchService.Search API calls. Do not use it when +// there is no traffic for Search API. * `user-event` - Using +// suggestions generated from user-imported search events. * +// `document-completable` - Using suggestions taken directly from +// user-imported document fields marked as completable. Default values: +// * `document` is the default model for regular dataStores. * +// `search-history` is the default model for site search dataStores. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique +// identifier for tracking visitors. For example, this could be +// implemented with an HTTP cookie, which should be able to uniquely +// identify a visitor on a single device. This unique identifier should +// not change if the visitor logs in or out of the website. This field +// should NOT have a fixed value such as `unknown_visitor`. This should +// be the same identifier as UserEvent.user_pseudo_id and +// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded +// string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) + 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") + 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{ + "dataStore": c.dataStore, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.completeQuery" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, 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 := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ + 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": "Completes the specified user input with keyword suggestions.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:completeQuery", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.completeQuery", + // "parameterOrder": [ + // "dataStore" + // ], + // "parameters": { + // "dataStore": { + // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "includeTailSuggestions": { + // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", + // "location": "query", + // "type": "boolean" + // }, + // "query": { + // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", + // "location": "query", + // "type": "string" + // }, + // "queryModel": { + // "description": "Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "location": "query", + // "type": "string" + // }, + // "userPseudoId": { + // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+dataStore}:completeQuery", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.create": + +type ProjectsLocationsCollectionsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a DataStore. DataStore is for storing Documents. To +// serve these documents for Search, or Recommendation use case, an +// Engine needs to be created separately. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsCollectionsDataStoresCreateCall { + c := &ProjectsLocationsCollectionsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore + return c +} + +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user +// want to directly create an advanced data store for site search. If +// the data store is not configured as site search (GENERIC vertical and +// PUBLIC_WEBSITE content_config), this flag will be ignored. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c +} + +// DataStoreId sets the optional parameter "dataStoreId": Required. The +// ID to use for the DataStore, which will become the final component of +// the DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) + 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 *ProjectsLocationsCollectionsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCreateCall { + 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 *ProjectsLocationsCollectionsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCreateCall { + 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 *ProjectsLocationsCollectionsDataStoresCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) 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.googleclouddiscoveryenginev1alphadatastore) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + 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 "discoveryengine.projects.locations.collections.dataStores.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "createAdvancedSiteSearch": { + // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "dataStoreId": { + // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/dataStores", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.delete": + +type ProjectsLocationsCollectionsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to delete the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the DataStore to +// delete does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) Delete(name string) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresDeleteCall{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 *ProjectsLocationsCollectionsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresDeleteCall { + 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 *ProjectsLocationsCollectionsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresDeleteCall { + 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 *ProjectsLocationsCollectionsDataStoresDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.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 *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.get": + +type ProjectsLocationsCollectionsDataStoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to access the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested +// DataStore does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) Get(name string) *ProjectsLocationsCollectionsDataStoresGetCall { + c := &ProjectsLocationsCollectionsDataStoresGetCall{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 *ProjectsLocationsCollectionsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetCall { + 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 *ProjectsLocationsCollectionsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetCall { + 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 *ProjectsLocationsCollectionsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetCall { + 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 *ProjectsLocationsCollectionsDataStoresGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDataStore.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 *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, 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 := &GoogleCloudDiscoveryengineV1alphaDataStore{ + 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 DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.list": + +type ProjectsLocationsCollectionsDataStoresListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the DataStores associated with the project. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. If the caller does not have permission to list DataStoress under +// this location, regardless of whether or not this data store exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *ProjectsLocationsCollectionsDataStoresListCall { + c := &ProjectsLocationsCollectionsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' +func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum +// allowed value is 50. Values above 50 will be coerced to 50. If this +// field is negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresListCall { + 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 *ProjectsLocationsCollectionsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresListCall { + 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 *ProjectsLocationsCollectionsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresListCall { + 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 *ProjectsLocationsCollectionsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresListCall { + 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 *ProjectsLocationsCollectionsDataStoresListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + 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 "discoveryengine.projects.locations.collections.dataStores.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.ServerRespons +// e.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 *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, 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 := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ + 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 the DataStores associated with the project.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStoress under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/dataStores", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse" + // }, + // "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 *ProjectsLocationsCollectionsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) 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 "discoveryengine.projects.locations.collections.dataStores.patch": + +type ProjectsLocationsCollectionsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataStore +// +// - name: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsCollectionsDataStoresPatchCall { + c := &ProjectsLocationsCollectionsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided DataStore to update. If an unsupported or +// unknown field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) 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.googleclouddiscoveryenginev1alphadatastore) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDataStore.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 *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, 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 := &GoogleCloudDiscoveryengineV1alphaDataStore{ + 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 DataStore", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.create": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Document. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID +// to use for the Document, which will become the final component of the +// Document.name. If the caller does not have permission to create the +// Document, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. This field must be unique +// among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to +// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length +// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is +// returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) 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.googleclouddiscoveryenginev1alphadocument) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + 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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocument.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, 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 := &GoogleCloudDiscoveryengineV1alphaDocument{ + 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 Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "documentId": { + // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/documents", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to delete the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the Document to delete does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall{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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) 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 Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.get": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to access the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the requested Document does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall{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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocument.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, 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 := &GoogleCloudDiscoveryengineV1alphaDocument{ + 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 Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.import": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items will be created. Note: It is possible +// for a subset of the Documents to be successfully updated. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. Requires create/update +// permission. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) 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.googleclouddiscoveryenginev1alphaimportdocumentsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:import") + 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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.import" 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) 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": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/documents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.list": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Gets a list of Documents. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. Use `default_branch` as +// the branch ID, to list documents under the default branch. If the +// caller does not have permission to list Documents under this +// branch, regardless of whether or not this branch exists, a +// `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Documents to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the +// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + 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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, 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 := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ + 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 list of Documents.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/documents", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse" + // }, + // "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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) 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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Document. +// +// - name: Immutable. The full resource name of the document. Format: +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document_id}`. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Document is not found, a new Document will be created. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) 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.googleclouddiscoveryenginev1alphadocument) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocument.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, 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 := &GoogleCloudDiscoveryengineV1alphaDocument{ + 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 Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Document is not found, a new Document will be created.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Purge: Permanently deletes all selected Documents in a branch. This +// process is asynchronous. Depending on the number of Documents to be +// deleted, this operation can take hours to complete. Before the delete +// operation completes, some Documents might still be returned by +// DocumentService.GetDocument or DocumentService.ListDocuments. To get +// a list of the Documents to be deleted, set +// PurgeDocumentsRequest.force to false. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) 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.googleclouddiscoveryenginev1alphapurgedocumentsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:purge") + 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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge" 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) 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": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/documents:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.get": + +type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.list": + +type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/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) +} - // 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:"-"` +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.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/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "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": "v1alpha/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } - // 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) +// 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) 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 "discoveryengine.locations.lookupWidgetConfig": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.converse": -type LocationsLookupWidgetConfigCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphalookupwidgetconfigrequest *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// LookupWidgetConfig: Gets the Widget Config using the uuid. +// Converse: Converses a conversation. // -// - location: The location resource where lookup widget will be -// performed. Format: `locations/{location}`. -func (r *LocationsService) LookupWidgetConfig(location string, googleclouddiscoveryenginev1alphalookupwidgetconfigrequest *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest) *LocationsLookupWidgetConfigCall { - c := &LocationsLookupWidgetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphalookupwidgetconfigrequest = googleclouddiscoveryenginev1alphalookupwidgetconfigrequest +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +// Use +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/-` to activate +// auto session mode, which automatically creates a new conversation +// inside a ConverseConversation session. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest 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 *LocationsLookupWidgetConfigCall) Fields(s ...googleapi.Field) *LocationsLookupWidgetConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6861,21 +10835,21 @@ func (c *LocationsLookupWidgetConfigCall) Fields(s ...googleapi.Field) *Location // 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 *LocationsLookupWidgetConfigCall) Context(ctx context.Context) *LocationsLookupWidgetConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { 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 *LocationsLookupWidgetConfigCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsLookupWidgetConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) 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_ { @@ -6883,14 +10857,14 @@ func (c *LocationsLookupWidgetConfigCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphalookupwidgetconfigrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/lookupWidgetConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6898,22 +10872,22 @@ func (c *LocationsLookupWidgetConfigCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.locations.lookupWidgetConfig" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.converse" call. // Exactly one of -// *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse.ServerRes -// ponse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.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 *LocationsLookupWidgetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6932,7 +10906,7 @@ func (c *LocationsLookupWidgetConfigCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6944,28 +10918,28 @@ func (c *LocationsLookupWidgetConfigCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Gets the Widget Config using the uuid.", - // "flatPath": "v1alpha/locations/{locationsId}/lookupWidgetConfig", + // "description": "Converses a conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", // "httpMethod": "POST", - // "id": "discoveryengine.locations.lookupWidgetConfig", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.converse", // "parameterOrder": [ - // "location" + // "name" // ], // "parameters": { - // "location": { - // "description": "Required. The location resource where lookup widget will be performed. Format: `locations/{location}`", + // "name": { + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", // "location": "path", - // "pattern": "^locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}/lookupWidgetConfig", + // "path": "v1alpha/{+name}:converse", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6974,35 +10948,34 @@ func (c *LocationsLookupWidgetConfigCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "discoveryengine.locations.widgetCompleteQuery": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.create": -type LocationsWidgetCompleteQueryCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphawidgetcompletequeryrequest *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// WidgetCompleteQuery: Performs a user input completion with keyword -// suggestion. Similar to the CompletionService.CompleteQuery method, -// but a widget version that allows CompleteQuery without API Key. It -// supports CompleteQuery with or without JWT token. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - location: The location resource where widget complete query will be -// performed. Format: `locations/{location}`. -func (r *LocationsService) WidgetCompleteQuery(location string, googleclouddiscoveryenginev1alphawidgetcompletequeryrequest *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest) *LocationsWidgetCompleteQueryCall { - c := &LocationsWidgetCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphawidgetcompletequeryrequest = googleclouddiscoveryenginev1alphawidgetcompletequeryrequest +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation 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 *LocationsWidgetCompleteQueryCall) Fields(s ...googleapi.Field) *LocationsWidgetCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7010,21 +10983,21 @@ func (c *LocationsWidgetCompleteQueryCall) Fields(s ...googleapi.Field) *Locatio // 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 *LocationsWidgetCompleteQueryCall) Context(ctx context.Context) *LocationsWidgetCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { 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 *LocationsWidgetCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsWidgetCompleteQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) 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_ { @@ -7032,14 +11005,14 @@ func (c *LocationsWidgetCompleteQueryCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetcompletequeryrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetCompleteQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -7047,22 +11020,21 @@ func (c *LocationsWidgetCompleteQueryCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.locations.widgetCompleteQuery" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse or +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse.ServerRe -// sponse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaConversation.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 *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7081,7 +11053,7 @@ func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7093,28 +11065,28 @@ func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Performs a user input completion with keyword suggestion. Similar to the CompletionService.CompleteQuery method, but a widget version that allows CompleteQuery without API Key. It supports CompleteQuery with or without JWT token.", - // "flatPath": "v1alpha/locations/{locationsId}/widgetCompleteQuery", + // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations", // "httpMethod": "POST", - // "id": "discoveryengine.locations.widgetCompleteQuery", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.create", // "parameterOrder": [ - // "location" + // "parent" // ], // "parameters": { - // "location": { - // "description": "Required. The location resource where widget complete query will be performed. Format: `locations/{location}`", + // "parent": { + // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", - // "pattern": "^locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}/widgetCompleteQuery", + // "path": "v1alpha/{+parent}/conversations", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7123,32 +11095,32 @@ func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "discoveryengine.locations.widgetConverseConversation": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.delete": -type LocationsWidgetConverseConversationCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// WidgetConverseConversation: Converse a conversation with Widget. +// Delete: Deletes a Conversation. If the Conversation to delete does +// not exist, a NOT_FOUND error is returned. // -// - location: The location resource where widget converse conversation -// will be performed. Format: `locations/{location}`. -func (r *LocationsService) WidgetConverseConversation(location string, googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) *LocationsWidgetConverseConversationCall { - c := &LocationsWidgetConverseConversationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest = googleclouddiscoveryenginev1alphawidgetconverseconversationrequest +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{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 *LocationsWidgetConverseConversationCall) Fields(s ...googleapi.Field) *LocationsWidgetConverseConversationCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7156,21 +11128,21 @@ func (c *LocationsWidgetConverseConversationCall) 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 *LocationsWidgetConverseConversationCall) Context(ctx context.Context) *LocationsWidgetConverseConversationCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { 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 *LocationsWidgetConverseConversationCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsWidgetConverseConversationCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) 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_ { @@ -7178,37 +11150,29 @@ func (c *LocationsWidgetConverseConversationCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetConverseConversation") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.locations.widgetConverseConversation" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse.S -// erverResponse.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 *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.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 *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7227,7 +11191,7 @@ func (c *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7239,28 +11203,25 @@ func (c *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Converse a conversation with Widget.", - // "flatPath": "v1alpha/locations/{locationsId}/widgetConverseConversation", - // "httpMethod": "POST", - // "id": "discoveryengine.locations.widgetConverseConversation", + // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.delete", // "parameterOrder": [ - // "location" + // "name" // ], // "parameters": { - // "location": { - // "description": "Required. The location resource where widget converse conversation will be performed. Format: `locations/{location}`", + // "name": { + // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", - // "pattern": "^locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}/widgetConverseConversation", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7269,93 +11230,99 @@ func (c *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOptio } -// method id "discoveryengine.locations.widgetSearch": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.get": -type LocationsWidgetSearchCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// WidgetSearch: Performs a search. Similar to the SearchService.Search -// method, but a widget version that allows search without API Key. It -// supports search with or without JWT token. +// Get: Gets a Conversation. // -// - location: The location resource where widget search will be -// performed. Format: `locations/{location}`. -func (r *LocationsService) WidgetSearch(location string, googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) *LocationsWidgetSearchCall { - c := &LocationsWidgetSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphawidgetsearchrequest = googleclouddiscoveryenginev1alphawidgetsearchrequest +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{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 *LocationsWidgetSearchCall) Fields(s ...googleapi.Field) *LocationsWidgetSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { + 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 *LocationsWidgetSearchCall) Context(ctx context.Context) *LocationsWidgetSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { 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 *LocationsWidgetSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsWidgetSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) 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.googleclouddiscoveryenginev1alphawidgetsearchrequest) - 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, "v1alpha/{+location}/widgetSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.locations.widgetSearch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse.ServerResponse. -// Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConversation.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 *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7374,7 +11341,7 @@ func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7386,28 +11353,25 @@ func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleClo } return ret, nil // { - // "description": "Performs a search. Similar to the SearchService.Search method, but a widget version that allows search without API Key. It supports search with or without JWT token.", - // "flatPath": "v1alpha/locations/{locationsId}/widgetSearch", - // "httpMethod": "POST", - // "id": "discoveryengine.locations.widgetSearch", + // "description": "Gets a Conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.get", // "parameterOrder": [ - // "location" + // "name" // ], // "parameters": { - // "location": { - // "description": "Required. The location resource where widget search will be performed. Format: `locations/{location}`", + // "name": { + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", - // "pattern": "^locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}/widgetSearch", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7416,82 +11380,66 @@ func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleClo } -// method id "discoveryengine.projects.locations.collections.dataStores.completeQuery": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.list": -type ProjectsLocationsCollectionsDataStoresCompleteQueryCall struct { +type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { s *Service - dataStore string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// CompleteQuery: Completes the specified user input with keyword -// suggestions. +// List: Lists all Conversations by their parent DataStore. // -// - dataStore: The parent data store resource name for which the -// completion is performed, such as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store`. -func (r *ProjectsLocationsCollectionsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c := &ProjectsLocationsCollectionsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// IncludeTailSuggestions sets the optional parameter -// "includeTailSuggestions": Indicates if tail suggestions should be -// returned if there are no suggestions that match the full query. Even -// if set to true, if there are suggestions that match the full query, -// those are returned and no tail suggestions are returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("filter", filter) return c } -// Query sets the optional parameter "query": Required. The typeahead -// input used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `conversation_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// QueryModel sets the optional parameter "queryModel": Selects data -// model of query suggestions for serving. Currently supported values: * -// `document` - Using suggestions generated from user-imported -// documents. * `search-history` - Using suggestions generated from the -// past history of SearchService.Search API calls. Do not use it when -// there is no traffic for Search API. * `user-event` - Using -// suggestions generated from user-imported search events. * -// `document-completable` - Using suggestions taken directly from -// user-imported document fields marked as completable. Default values: -// * `document` is the default model for regular dataStores. * -// `search-history` is the default model for site search dataStores. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UserPseudoId sets the optional parameter "userPseudoId": A unique -// identifier for tracking visitors. For example, this could be -// implemented with an HTTP cookie, which should be able to uniquely -// identify a visitor on a single device. This unique identifier should -// not change if the visitor logs in or out of the website. This field -// should NOT have a fixed value such as `unknown_visitor`. This should -// be the same identifier as UserEvent.user_pseudo_id and -// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded -// string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListConversations` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7501,7 +11449,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...go // 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -7509,21 +11457,21 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(en // 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) 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_ { @@ -7536,7 +11484,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -7544,22 +11492,22 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.completeQuery" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. // Exactly one of -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse -// .Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp +// onse.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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7578,7 +11526,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7590,45 +11538,46 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo } return ret, nil // { - // "description": "Completes the specified user input with keyword suggestions.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:completeQuery", + // "description": "Lists all Conversations by their parent DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.completeQuery", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.list", // "parameterOrder": [ - // "dataStore" + // "parent" // ], // "parameters": { - // "dataStore": { - // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", - // "required": true, + // "filter": { + // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", + // "location": "query", // "type": "string" // }, - // "includeTailSuggestions": { - // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", + // "orderBy": { + // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: \"update_time desc\" \"create_time\"", // "location": "query", - // "type": "boolean" + // "type": "string" // }, - // "query": { - // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", + // "pageSize": { + // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "queryModel": { - // "description": "Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "pageToken": { + // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" // }, - // "userPseudoId": { - // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", + // "parent": { + // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+dataStore}:completeQuery", + // "path": "v1alpha/{+parent}/conversations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7637,48 +11586,65 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.create": +// 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) 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 ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.patch": + +type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Document. +// Patch: Updates a Conversation. Conversation action type cannot be +// changed. If the Conversation to update does not exist, a NOT_FOUND +// error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/dataStore/*/con +// versations/*`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } -// DocumentId sets the optional parameter "documentId": Required. The ID -// to use for the Document, which will become the final component of the -// Document.name. If the caller does not have permission to create the -// Document, regardless of whether or not it exists, a -// `PERMISSION_DENIED` error is returned. This field must be unique -// among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to -// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length -// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is -// returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Conversation to update. The following are NOT +// supported: * conversation.name If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7686,21 +11652,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) 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_ { @@ -7708,36 +11674,36 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) doRe } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaConversation.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7756,7 +11722,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7768,33 +11734,34 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o } return ret, nil // { - // "description": "Creates a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "documentId": { - // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * conversation.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7803,27 +11770,24 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.get": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Document. +// 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: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to delete the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the Document to delete does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -7831,41 +11795,54 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -7876,14 +11853,14 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.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 +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7902,7 +11879,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7914,25 +11891,25 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o } return ret, nil // { - // "description": "Deletes a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete", + // "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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7941,9 +11918,9 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.get": +// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.list": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { +type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -7952,25 +11929,42 @@ type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { header_ http.Header } -// Get: Gets a Document. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to access the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the requested Document does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7980,7 +11974,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields( // 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -7988,21 +11982,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneM // 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) 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_ { @@ -8015,7 +12009,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doReque var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8028,16 +12022,15 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8056,7 +12049,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8068,25 +12061,41 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts } return ret, nil // { - // "description": "Gets a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+$", // "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": "v1alpha/{+name}", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8095,93 +12104,118 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.import": - -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) 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) + } } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items will be created. Note: It is possible -// for a subset of the Documents to be successfully updated. -// -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Requires create/update -// permission. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest +// method id "discoveryengine.projects.locations.collections.dataStores.operations.get": + +type ProjectsLocationsCollectionsDataStoresOperationsGetCall 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 *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) 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.googleclouddiscoveryenginev1alphaimportdocumentsrequest) - 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, "v1alpha/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8212,26 +12246,23 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(o } return ret, nil // { - // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.import", + // "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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents:import", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -8242,48 +12273,45 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.list": +// method id "discoveryengine.projects.locations.collections.dataStores.operations.list": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall struct { +type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Gets a list of Documents. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Use `default_branch` as -// the branch ID, to list documents under the default branch. If the -// caller does not have permission to list Documents under this -// branch, regardless of whether or not this branch exists, a -// `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// Documents to return. If unspecified, defaults to 100. The maximum -// allowed value is 1000. Values above 1000 will be coerced to 1000. If -// this field is negative, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the -// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -8291,7 +12319,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8301,7 +12329,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields // 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -8309,21 +12337,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNone // 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) 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_ { @@ -8336,7 +12364,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequ var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8344,22 +12372,20 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequ } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse or error will +// Do executes the "discoveryengine.projects.locations.collections.dataStores.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 -// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, error) { +// *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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8378,7 +12404,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8390,36 +12416,41 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opt } return ret, nil // { - // "description": "Gets a list of Documents.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.operations.list", // "parameterOrder": [ - // "parent" + // "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/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, // "pageSize": { - // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", - // "required": true, - // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8431,7 +12462,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opt // 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) 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 { @@ -8449,42 +12480,43 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages( } } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.create": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Document. +// Create: Creates a Schema. // -// - name: Immutable. The full resource name of the document. Format: +// - parent: The parent data store resource name, in the format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document_id}`. -// This field must be a UTF-8 encoded string with a length limit of -// 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema return c } -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Document is not found, a new Document will be created. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// SchemaId sets the optional parameter "schemaId": Required. The ID to +// use for the Schema, which will become the final component of the +// Schema.name. This field should conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { + c.urlParams_.Set("schemaId", schemaId) 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8492,21 +12524,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) 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_ { @@ -8514,36 +12546,34 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) doReq } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8562,7 +12592,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8574,33 +12604,33 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op } return ret, nil // { - // "description": "Updates a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch", + // "description": "Creates a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Document is not found, a new Document will be created.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "parent": { + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "schemaId": { + // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/schemas", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8609,39 +12639,31 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.delete": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all selected Documents in a branch. This -// process is asynchronous. Depending on the number of Documents to be -// deleted, this operation can take hours to complete. Before the delete -// operation completes, some Documents might still be returned by -// DocumentService.GetDocument or DocumentService.ListDocuments. To get -// a list of the Documents to be deleted, set -// PurgeDocumentsRequest.force to false. +// Delete: Deletes a Schema. // -// - parent: The parent resource name, such as +// - name: The full resource name of the schema, in the format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest +// taStores/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8649,21 +12671,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) 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_ { @@ -8671,34 +12693,29 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) doReq } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgedocumentsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8729,26 +12746,23 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(op } return ret, nil // { - // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge", + // "description": "Deletes a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "name": { + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents:purge", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -8759,9 +12773,9 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(op } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.get": -type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -8770,13 +12784,13 @@ type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a Schema. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -8784,7 +12798,7 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(na // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8794,7 +12808,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields // 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.ifNoneMatch_ = entityTag return c } @@ -8802,21 +12816,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNone // 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) 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_ { @@ -8842,14 +12856,15 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.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 +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSchema or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaSchema.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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8868,7 +12883,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8880,25 +12895,25 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + // "description": "Gets a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8907,45 +12922,43 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.list": -type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Gets a list of Schemas. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of Schemas to return. The service may return fewer than this value. +// If unspecified, at most 100 Schemas will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous SchemaService.ListSchemas call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to SchemaService.ListSchemas must match the call +// that provided the page token. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -8953,7 +12966,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8963,7 +12976,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Field // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.ifNoneMatch_ = entityTag return c } @@ -8971,21 +12984,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNon // 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) 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_ { @@ -8998,7 +13011,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doReq var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9006,20 +13019,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doReq } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListSchemasResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9038,7 +13052,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9050,41 +13064,36 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "description": "Gets a list of Schemas.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+parent}/schemas", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListSchemasResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9096,7 +13105,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op // 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -9114,38 +13123,43 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages } } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.converse": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.patch": -type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Patch: Updates a Schema. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -// Use -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/-` to activate -// auto session mode, which automatically creates a new conversation -// inside a ConverseConversation session. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The full resource name of the schema, in the +// format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 +// encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Schema is not found, a new Schema will be created. In +// this situation, `update_mask` is ignored. +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) 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 *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9153,21 +13167,21 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields // 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 *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { 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 *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) 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_ { @@ -9175,16 +13189,16 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequ } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -9195,17 +13209,14 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.converse" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.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 *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9224,7 +13235,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9236,28 +13247,33 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt } return ret, nil // { - // "description": "Converses a conversation.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.converse", + // "description": "Updates a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.patch", // "parameterOrder": [ // "name" // ], // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:converse", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9266,93 +13282,97 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.create": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get": -type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +// 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. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) 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.googleclouddiscoveryenginev1alphaconversation) - 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, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.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 *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9371,7 +13391,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9383,28 +13403,25 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts } return ret, nil // { - // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.create", + // "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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversations", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9413,66 +13430,100 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list": + +type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} -type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Delete: Deletes a Conversation. If the Conversation to delete does -// not exist, a NOT_FOUND error is returned. -// -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -9483,14 +13534,15 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.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 +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.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 *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9509,7 +13561,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9521,25 +13573,41 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts } return ret, nil // { - // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.delete", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "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": "v1alpha/{+name}", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9548,99 +13616,122 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.get": +// 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) 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) + } +} -type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend": + +type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Conversation. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your Recommend requests. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest 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 *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { 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 *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { - 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 *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { 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 *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea +// der 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 *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9659,7 +13750,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9671,161 +13762,129 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... } return ret, nil // { - // "description": "Gets a Conversation.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.get", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+servingConfig}:recommend", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.list": - -type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all Conversations by their parent DataStore. -// -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} + // ] + // } -// Filter sets the optional parameter "filter": A filter to apply on the -// list results. The supported features are: user_pseudo_id, state. -// Example: "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.urlParams_.Set("filter", filter) - return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields to order by, sorted in ascending order. Use "desc" after a -// field name for descending. Supported fields: * `update_time` * -// `create_time` * `conversation_name` Example: "update_time desc" -// "create_time" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search": -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 50. Max allowed value -// is 1000. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListConversations` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Search: Performs a search. +// +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp -// onse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaSearchResponse.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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9844,7 +13903,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9856,46 +13915,28 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. } return ret, nil // { - // "description": "Lists all Conversations by their parent DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.list", + // "description": "Performs a search.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search", // "parameterOrder": [ - // "parent" + // "servingConfig" // ], // "parameters": { - // "filter": { - // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: \"update_time desc\" \"create_time\"", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversations", + // "path": "v1alpha/{+servingConfig}:search", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9907,9 +13948,9 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. // 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) // reset paging to original point for { x, err := c.Do() if err != nil { @@ -9921,48 +13962,38 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx if x.NextPageToken == "" { return nil } - c.PageToken(x.NextPageToken) + c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken } } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris": -type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be -// changed. If the Conversation to update does not exist, a NOT_FOUND -// error is returned. +// RecrawlUris: Request on-demand recrawl for a list of URIs. // -// - name: Immutable. Fully qualified name -// `project/*/locations/global/collections/{collection}/dataStore/*/con -// versations/*`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Conversation to update. The following are NOT -// supported: * conversation.name If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine` +// . +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alpharecrawlurisrequest = googleclouddiscoveryenginev1alpharecrawlurisrequest 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 *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9970,21 +14001,21 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s // 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 *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { 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 *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) 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_ { @@ -9992,36 +14023,34 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecrawlurisrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:recrawlUris") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.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 *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10040,7 +14069,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10052,34 +14081,28 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . } return ret, nil // { - // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.patch", + // "description": "Request on-demand recrawl for a list of URIs.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:recrawlUris", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris", // "parameterOrder": [ - // "name" + // "siteSearchEngine" // ], // "parameters": { - // "name": { - // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`", + // "siteSearchEngine": { + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * conversation.name If not set or empty, all supported fields are updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+siteSearchEngine}:recrawlUris", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10088,9 +14111,9 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . } -// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get": -type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -10104,8 +14127,8 @@ type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -10113,7 +14136,7 @@ func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10123,7 +14146,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s // 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -10131,21 +14154,21 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMa // 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) 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_ { @@ -10171,14 +14194,14 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.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 *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10210,9 +14233,9 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get", // "parameterOrder": [ // "name" // ], @@ -10220,7 +14243,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -10236,9 +14259,9 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list": -type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -10252,29 +14275,29 @@ type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -10282,7 +14305,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageTok // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10292,7 +14315,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields( // 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -10300,21 +14323,21 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneM // 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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_ { @@ -10340,7 +14363,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.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 @@ -10348,7 +14371,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doReque // 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10380,9 +14403,9 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list", // "parameterOrder": [ // "name" // ], @@ -10395,7 +14418,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // }, @@ -10425,7 +14448,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts // 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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 { @@ -10443,9 +14466,9 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Pages(c } } -// method id "discoveryengine.projects.locations.collections.dataStores.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get": -type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -10459,8 +14482,8 @@ type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -10468,7 +14491,7 @@ func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10478,7 +14501,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...go // 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 *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -10486,21 +14509,21 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(en // 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 *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) 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_ { @@ -10526,14 +14549,14 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.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 *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10565,9 +14588,9 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations/{operationsId}", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get", // "parameterOrder": [ // "name" // ], @@ -10575,7 +14598,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -10591,9 +14614,9 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list": -type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -10607,29 +14630,29 @@ type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -10637,7 +14660,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pag // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10647,7 +14670,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...g // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -10655,21 +14678,21 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(e // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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_ { @@ -10695,7 +14718,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.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 @@ -10703,7 +14726,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt // 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10735,9 +14758,9 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list", // "parameterOrder": [ // "name" // ], @@ -10750,7 +14773,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites$", // "required": true, // "type": "string" // }, @@ -10780,7 +14803,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go // 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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 { @@ -10798,82 +14821,107 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx con } } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.create": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.collect": -type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party +// domain. This method is used only by the Discovery Engine API +// JavaScript pixel and Google Tag Manager. Users should not call this +// method directly. // -// - parent: The parent data store resource name, in the format of +// - parent: The parent DataStore resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/da // taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema return c } -// SchemaId sets the optional parameter "schemaId": Required. The ID to -// use for the Schema, which will become the final component of the -// Schema.name. This field should conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// Ets sets the optional parameter "ets": The event timestamp in +// milliseconds. This prevents browser caching of otherwise identical +// get requests. The name is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) + return c +} + +// Uri sets the optional parameter "uri": The URL including +// cgi-parameters but excluding the hash fragment with a length limit of +// 5,000 characters. This is often more useful than the referer URL, +// because many browsers only send the domain for third-party requests. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL +// encoded UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) 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 *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { 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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + 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 *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) 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.googleclouddiscoveryenginev1alphaschema) - 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, "v1alpha/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -10884,14 +14932,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10910,7 +14958,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10922,33 +14970,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo } return ret, nil // { - // "description": "Creates a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.create", + // "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:collect", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.collect", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "ets": { + // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // }, - // "schemaId": { - // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + // "uri": { + // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", // "location": "query", // "type": "string" - // } - // }, - // "path": "v1alpha/{+parent}/schemas", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // }, + // "userEvent": { + // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + // "location": "query", + // "type": "string" + // } // }, + // "path": "v1alpha/{+parent}/userEvents:collect", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10957,31 +15013,38 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.import": -type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Schema. +// Import: Bulk import of User events. Request processing might be +// synchronous. Events that already exist are skipped. Use this method +// for backfilling historical user events. Operation.response is of type +// ImportResponse. Note that it is possible for a subset of the items to +// be successfully inserted. Operation.metadata is of type +// ImportMetadata. // -// - name: The full resource name of the schema, in the format of +// - parent: Parent DataStore resource name, of the form // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest 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 *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10989,21 +15052,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...go // 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 *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) 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_ { @@ -11011,29 +15074,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportusereventsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:import") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" 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 *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11064,23 +15132,26 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo } return ret, nil // { - // "description": "Deletes a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.delete", + // "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.import", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "parent": { + // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/userEvents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -11091,98 +15162,94 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.get": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.purge": -type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Schema. +// Purge: Deletes permanently all user events specified by the filter +// provided. Depending on the number of events specified by the filter, +// this operation could take hours or days to complete. To test a +// filter, use the list command first. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the catalog under which the events are +// created. The format is +// `projects/${projectId}/locations/global/collections/{$collectionId}/ +// dataStores/${dataStoreId}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest 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 *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { - 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 *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgeusereventsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:purge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSchema or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaSchema.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 "discoveryengine.projects.locations.collections.dataStores.userEvents.purge" 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 *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11201,7 +15268,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSchema{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11213,25 +15280,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google } return ret, nil // { - // "description": "Gets a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.get", + // "description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.purge", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "parent": { + // "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/userEvents:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11240,98 +15310,72 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.list": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.write": -type ProjectsLocationsCollectionsDataStoresSchemasListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of Schemas. +// Write: Writes a single user event. // -// - parent: The parent data store resource name, in the format of +// - parent: The parent DataStore resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/da // taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of Schemas to return. The service may return fewer than this value. -// If unspecified, at most 100 Schemas will be returned. The maximum -// value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous SchemaService.ListSchemas call. Provide this -// to retrieve the subsequent page. When paginating, all other -// parameters provided to SchemaService.ListSchemas must match the call -// that provided the page token. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1alphauserevent = googleclouddiscoveryenginev1alphauserevent 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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - 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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) 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_) + reqHeaders[k] = v } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphauserevent) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:write") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -11342,16 +15386,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaListSchemasResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.ServerResponse.H -// eader or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaUserEvent or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaUserEvent.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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaUserEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11370,7 +15414,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaUserEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11382,36 +15426,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl } return ret, nil // { - // "description": "Gets a list of Schemas.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.list", + // "description": "Writes a single user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:write", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.write", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas 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 SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/schemas", + // "path": "v1alpha/{+parent}/userEvents:write", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListSchemasResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11420,64 +15456,42 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl } -// 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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) 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 "discoveryengine.projects.locations.collections.dataStores.schemas.patch": +// method id "discoveryengine.projects.locations.collections.engines.create": -type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { +type ProjectsLocationsCollectionsEnginesCreateCall struct { s *Service - name string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + parent string + googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates a Schema. +// Create: Creates a Engine. // -// - name: Immutable. The full resource name of the schema, in the -// format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 -// encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { + c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine return c } -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Schema is not found, a new Schema will be created. In -// this situation, `update_mask` is ignored. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// EngineId sets the optional parameter "engineId": Required. The ID to +// use for the Engine, which will become the final component of the +// Engine's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { + c.urlParams_.Set("engineId", engineId) 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 *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11485,21 +15499,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...goo // 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 *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) 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_ { @@ -11507,34 +15521,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11565,30 +15579,30 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...goog } return ret, nil // { - // "description": "Updates a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.patch", + // "description": "Creates a Engine.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", + // "engineId": { + // "description": "Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "query", - // "type": "boolean" + // "type": "string" // }, - // "name": { - // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/engines", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -11600,24 +15614,26 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get": +// method id "discoveryengine.projects.locations.collections.engines.delete": -type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + 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. +// Delete: Deletes a Engine. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}`. If the caller does not have permission to +// delete the Engine, regardless of whether or not it exists, a +// PERMISSION_DENIED error is returned. If the Engine to delete does +// not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { + c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11625,54 +15641,41 @@ func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(nam // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -11683,14 +15686,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.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 +// Do executes the "discoveryengine.projects.locations.collections.engines.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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11709,7 +15712,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11721,25 +15724,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get", + // "description": "Deletes a Engine.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.engines.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11748,9 +15751,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list": +// method id "discoveryengine.projects.locations.collections.engines.get": -type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { +type ProjectsLocationsCollectionsEnginesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11759,42 +15762,21 @@ type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { 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`. +// Get: Gets a Engine. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { + c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11804,7 +15786,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields // 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -11812,21 +15794,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNone // 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) 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_ { @@ -11839,7 +15821,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequ var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11852,15 +15834,15 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// *GoogleCloudDiscoveryengineV1alphaEngine.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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11879,7 +15861,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11891,41 +15873,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations", + // "description": "Gets a Engine.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list", + // "id": "discoveryengine.projects.locations.collections.engines.get", // "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/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", - // "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", + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11934,115 +15900,118 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt } -// 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) 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 "discoveryengine.projects.locations.collections.engines.list": + +type ProjectsLocationsCollectionsEnginesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend": +// List: Lists all the Engines associated with the project. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. +func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { + c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} -type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: solution_type=SOLUTION_TYPE_SEARCH +func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { + c.urlParams_.Set("filter", filter) + return c } -// Recommend: Makes a recommendation, which requires a contextual user -// event. -// -// - servingConfig: Full resource name of the format: -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` Before you can request recommendations from your model, you -// must create at least one serving config for it. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest +// PageSize sets the optional parameter "pageSize": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { + 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 *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { 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 *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { + 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 *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { 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 *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesListCall) 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.googleclouddiscoveryenginev1alpharecommendrequest) - 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, "v1alpha/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea -// der or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListEnginesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListEnginesResponse.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 *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListEnginesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12061,7 +16030,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListEnginesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12073,28 +16042,41 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o } return ret, nil // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend", + // "description": "Lists all the Engines associated with the project.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.list", // "parameterOrder": [ - // "servingConfig" + // "parent" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + // "filter": { + // "description": "Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Not supported.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Not supported.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:recommend", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" - // }, + // "path": "v1alpha/{+parent}/engines", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListEnginesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12103,36 +16085,66 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search": +// 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 *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListEnginesResponse) 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 ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.engines.patch": + +type ProjectsLocationsCollectionsEnginesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// Patch: Updates an Engine // -// - servingConfig: The resource name of the Search serving config, such -// as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest +// - name: Immutable. The fully qualified resource name of the engine. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{engine}` engine should be 1-63 characters, and valid +// characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is +// returned. +func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { + c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Engine to update. If an unsupported or unknown +// field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12140,21 +16152,21 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields( // 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) 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_ { @@ -12162,38 +16174,35 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doReque } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaSearchResponse.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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaEngine.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 *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12212,7 +16221,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12224,85 +16233,70 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search", + // "description": "Updates an Engine", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.engines.patch", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "name": { + // "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:search", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" - // }, - // "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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.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.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken - } + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris": +// method id "discoveryengine.projects.locations.collections.engines.pause": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { +type ProjectsLocationsCollectionsEnginesPauseCall struct { s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest + name string + googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// RecrawlUris: Request on-demand recrawl for a list of URIs. +// Pause: Pauses the training of an existing engine. Only applicable if +// solution_type is SOLUTION_TYPE_RECOMMENDATION. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such -// as -// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine` -// . -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alpharecrawlurisrequest = googleclouddiscoveryenginev1alpharecrawlurisrequest +// - name: The name of the engine to pause. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { + c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphapauseenginerequest = googleclouddiscoveryenginev1alphapauseenginerequest 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12310,21 +16304,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) 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_ { @@ -12332,14 +16326,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecrawlurisrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapauseenginerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:recrawlUris") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:pause") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12347,19 +16341,20 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" 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 +// Do executes the "discoveryengine.projects.locations.collections.engines.pause" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaEngine.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12378,7 +16373,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12390,28 +16385,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } return ret, nil // { - // "description": "Request on-demand recrawl for a list of URIs.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:recrawlUris", + // "description": "Pauses the training of an existing engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:pause", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris", + // "id": "discoveryengine.projects.locations.collections.engines.pause", // "parameterOrder": [ - // "siteSearchEngine" + // "name" // ], // "parameters": { - // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", + // "name": { + // "description": "Required. The name of the engine to pause. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+siteSearchEngine}:recrawlUris", + // "path": "v1alpha/{+name}:pause", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12420,79 +16415,73 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get": +// method id "discoveryengine.projects.locations.collections.engines.resume": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesResumeCall struct { + s *Service + name string + googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest + urlParams_ gensupport.URLParams + 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. +// Resume: Resumes the training of an existing engine. Only applicable +// if solution_type is SOLUTION_TYPE_RECOMMENDATION. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the engine to resume. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { + c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alpharesumeenginerequest = googleclouddiscoveryenginev1alpharesumeenginerequest 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharesumeenginerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:resume") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -12503,14 +16492,15 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.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 +// Do executes the "discoveryengine.projects.locations.collections.engines.resume" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaEngine.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12529,7 +16519,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12541,25 +16531,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get", + // "description": "Resumes the training of an existing engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:resume", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.resume", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The name of the engine to resume. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}:resume", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12568,100 +16561,73 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list": +// method id "discoveryengine.projects.locations.collections.engines.tune": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesTuneCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest + urlParams_ gensupport.URLParams + 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`. +// Tune: Tunes an existing engine. Only applicable if solution_type is +// SOLUTION_TYPE_RECOMMENDATION. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the engine to tune. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { + c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1alphatuneenginerequest = googleclouddiscoveryenginev1alphatuneenginerequest 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatuneenginerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:tune") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -12672,15 +16638,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.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 +// Do executes the "discoveryengine.projects.locations.collections.engines.tune" 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12699,7 +16664,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12711,41 +16676,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list", + // "description": "Tunes an existing engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:tune", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.tune", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The resource name of the engine to tune. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "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": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+name}:tune", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12754,30 +16706,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } -// 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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 "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get": +// method id "discoveryengine.projects.locations.collections.engines.operations.get": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { +type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12791,8 +16722,8 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperations // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12800,7 +16731,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12810,7 +16741,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -12818,21 +16749,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) 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_ { @@ -12858,14 +16789,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12897,9 +16828,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations/{operationsId}", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get", + // "id": "discoveryengine.projects.locations.collections.engines.operations.get", // "parameterOrder": [ // "name" // ], @@ -12907,7 +16838,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -12923,9 +16854,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list": +// method id "discoveryengine.projects.locations.collections.engines.operations.list": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { +type ProjectsLocationsCollectionsEnginesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12939,29 +16870,29 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperations // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -12969,7 +16900,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12979,7 +16910,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -12987,21 +16918,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) 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_ { @@ -13027,7 +16958,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.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 @@ -13035,7 +16966,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13067,9 +16998,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list", + // "id": "discoveryengine.projects.locations.collections.engines.operations.list", // "parameterOrder": [ // "name" // ], @@ -13082,7 +17013,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // }, @@ -13112,7 +17043,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) 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 { @@ -13129,231 +17060,43 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat c.PageToken(x.NextPageToken) } } - -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.collect": - -type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Collect: Writes a single user event from the browser. This uses a GET -// request to due to browser restriction of POST-ing to a third-party -// domain. This method is used only by the Discovery Engine API -// JavaScript pixel and Google Tag Manager. Users should not call this -// method directly. -// -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Ets sets the optional parameter "ets": The event timestamp in -// milliseconds. This prevents browser caching of otherwise identical -// get requests. The name is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) - return c -} - -// Uri sets the optional parameter "uri": The URL including -// cgi-parameters but excluding the hash fragment with a length limit of -// 5,000 characters. This is often more useful than the referer URL, -// because many browsers only send the domain for third-party requests. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("uri", uri) - return c -} - -// UserEvent sets the optional parameter "userEvent": Required. URL -// encoded UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) - 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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - 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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - 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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - 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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:collect") - 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 "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. -// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleApiHttpBody{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:collect", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.collect", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "ets": { - // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "uri": { - // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", - // "location": "query", - // "type": "string" - // }, - // "userEvent": { - // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1alpha/{+parent}/userEvents:collect", - // "response": { - // "$ref": "GoogleApiHttpBody" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.import": - -type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend": + +type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of User events. Request processing might be -// synchronous. Events that already exist are skipped. Use this method -// for backfilling historical user events. Operation.response is of type -// ImportResponse. Note that it is possible for a subset of the items to -// be successfully inserted. Operation.metadata is of type -// ImportMetadata. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - parent: Parent DataStore resource name, of the form -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your Recommend requests. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest 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 *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13361,21 +17104,21 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s .. // 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 *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { 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 *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) 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_ { @@ -13383,14 +17126,14 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportusereventsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -13398,19 +17141,21 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(a } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" 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 *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea +// der 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 *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13429,7 +17174,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13441,28 +17186,28 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... } return ret, nil // { - // "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:import", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.import", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend", // "parameterOrder": [ - // "parent" + // "servingConfig" // ], // "parameters": { - // "parent": { - // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userEvents:import", + // "path": "v1alpha/{+servingConfig}:recommend", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13471,37 +17216,38 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.purge": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.search": -type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Deletes permanently all user events specified by the filter -// provided. Depending on the number of events specified by the filter, -// this operation could take hours or days to complete. To test a -// filter, use the list command first. +// Search: Performs a search. // -// - parent: The resource name of the catalog under which the events are -// created. The format is -// `projects/${projectId}/locations/global/collections/{$collectionId}/ -// dataStores/${dataStoreId}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest 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 *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13509,21 +17255,21 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Fields(s ... // 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 *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { 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 *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) 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_ { @@ -13531,14 +17277,14 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(al } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgeusereventsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -13546,19 +17292,23 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(al } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.purge" 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 *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaSearchResponse.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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13577,7 +17327,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13589,28 +17339,28 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...g } return ret, nil // { - // "description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:purge", + // "description": "Performs a search.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:search", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.purge", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.search", // "parameterOrder": [ - // "parent" + // "servingConfig" // ], // "parameters": { - // "parent": { - // "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userEvents:purge", + // "path": "v1alpha/{+servingConfig}:search", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13619,92 +17369,118 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.write": +// 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.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.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken + } +} -type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.operations.get": + +type ProjectsLocationsCollectionsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Write: Writes a single user event. +// 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. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphauserevent = googleclouddiscoveryenginev1alphauserevent +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { + c := &ProjectsLocationsCollectionsOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { 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 *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsGetCall) 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.googleclouddiscoveryenginev1alphauserevent) - 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, "v1alpha/{+parent}/userEvents:write") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaUserEvent or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaUserEvent.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 *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaUserEvent, error) { +// Do executes the "discoveryengine.projects.locations.collections.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 *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13723,7 +17499,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaUserEvent{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13735,28 +17511,25 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g } return ret, nil // { - // "description": "Writes a single user event.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:write", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.write", + // "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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userEvents:write", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13765,9 +17538,9 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.engines.operations.get": +// method id "discoveryengine.projects.locations.collections.operations.list": -type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { +type ProjectsLocationsCollectionsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -13776,21 +17549,42 @@ type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// 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 resource. -func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { - c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { + c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { + 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13800,7 +17594,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googl // 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -13808,21 +17602,21 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entit // 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsListCall) 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_ { @@ -13835,7 +17629,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt str var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13848,14 +17642,15 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.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 +// Do executes the "discoveryengine.projects.locations.collections.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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13874,7 +17669,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13886,25 +17681,41 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations/{operationsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.operations.get", + // "id": "discoveryengine.projects.locations.collections.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "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": "v1alpha/{+name}", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13913,53 +17724,103 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.collections.engines.operations.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsOperationsListCall) 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) + } +} -type ProjectsLocationsCollectionsEnginesOperationsListCall struct { +// method id "discoveryengine.projects.locations.dataStores.completeQuery": + +type ProjectsLocationsDataStoresCompleteQueryCall struct { s *Service - name string + dataStore 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`. +// CompleteQuery: Completes the specified user input with keyword +// suggestions. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - dataStore: The parent data store resource name for which the +// completion is performed, such as +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store`. +func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { + c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c.urlParams_.Set("filter", filter) +// IncludeTailSuggestions sets the optional parameter +// "includeTailSuggestions": Indicates if tail suggestions should be +// returned if there are no suggestions that match the full query. Even +// if set to true, if there are suggestions that match the full query, +// those are returned and no tail suggestions are returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Query sets the optional parameter "query": Required. The typeahead +// input used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// QueryModel sets the optional parameter "queryModel": Selects data +// model of query suggestions for serving. Currently supported values: * +// `document` - Using suggestions generated from user-imported +// documents. * `search-history` - Using suggestions generated from the +// past history of SearchService.Search API calls. Do not use it when +// there is no traffic for Search API. * `user-event` - Using +// suggestions generated from user-imported search events. * +// `document-completable` - Using suggestions taken directly from +// user-imported document fields marked as completable. Default values: +// * `document` is the default model for regular dataStores. * +// `search-history` is the default model for site search dataStores. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique +// identifier for tracking visitors. For example, this could be +// implemented with an HTTP cookie, which should be able to uniquely +// identify a visitor on a single device. This unique identifier should +// not change if the visitor logs in or out of the website. This field +// should NOT have a fixed value such as `unknown_visitor`. This should +// be the same identifier as UserEvent.user_pseudo_id and +// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded +// string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13969,7 +17830,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...goog // 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { c.ifNoneMatch_ = entityTag return c } @@ -13977,21 +17838,21 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(enti // 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) 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_ { @@ -14004,7 +17865,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14012,20 +17873,22 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "dataStore": c.dataStore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.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 *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14044,7 +17907,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14056,41 +17919,45 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations", + // "description": "Completes the specified user input with keyword suggestions.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}:completeQuery", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.completeQuery", // "parameterOrder": [ - // "name" + // "dataStore" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", + // "dataStore": { + // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", + // "includeTailSuggestions": { + // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", // "location": "query", - // "type": "integer" + // "type": "boolean" // }, - // "pageToken": { - // "description": "The standard list page token.", + // "query": { + // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", + // "location": "query", + // "type": "string" + // }, + // "queryModel": { + // "description": "Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "location": "query", + // "type": "string" + // }, + // "userPseudoId": { + // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", // "location": "query", // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+dataStore}:completeQuery", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14099,56 +17966,54 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl } -// 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) 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 "discoveryengine.projects.locations.dataStores.create": + +type ProjectsLocationsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend": +// Create: Creates a DataStore. DataStore is for storing Documents. To +// serve these documents for Search, or Recommendation use case, an +// Engine needs to be created separately. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresCreateCall { + c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore + return c +} -type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user +// want to directly create an advanced data store for site search. If +// the data store is not configured as site search (GENERIC vertical and +// PUBLIC_WEBSITE content_config), this flag will be ignored. +func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c } -// Recommend: Makes a recommendation, which requires a contextual user -// event. -// -// - servingConfig: Full resource name of the format: -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` Before you can request recommendations from your model, you -// must create at least one serving config for it. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest +// DataStoreId sets the optional parameter "dataStoreId": Required. The +// ID to use for the DataStore, which will become the final component of +// the DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) 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 *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14156,21 +18021,21 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields( // 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 *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { 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 *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresCreateCall) 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_ { @@ -14178,14 +18043,14 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doReque } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14193,21 +18058,19 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doReque } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea -// der 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 *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14226,7 +18089,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14238,28 +18101,38 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts } return ret, nil // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", + // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend", + // "id": "discoveryengine.projects.locations.dataStores.create", // "parameterOrder": [ - // "servingConfig" + // "parent" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + // "createAdvancedSiteSearch": { + // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "dataStoreId": { + // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:recommend", + // "path": "v1alpha/{+parent}/dataStores", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14268,36 +18141,34 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.search": +// method id "discoveryengine.projects.locations.dataStores.delete": -type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// Delete: Deletes a DataStore. // -// - servingConfig: The resource name of the Search serving config, such -// as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to delete the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the DataStore to +// delete does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { + c := &ProjectsLocationsDataStoresDeleteCall{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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14305,21 +18176,21 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s . // 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresDeleteCall) 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_ { @@ -14327,38 +18198,29 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaSearchResponse.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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.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 *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14377,7 +18239,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14389,60 +18251,36 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.search", + // "description": "Deletes a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.delete", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:search", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" - // }, - // "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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.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.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken - } + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// method id "discoveryengine.projects.locations.collections.operations.get": +// method id "discoveryengine.projects.locations.dataStores.get": -type ProjectsLocationsCollectionsOperationsGetCall struct { +type ProjectsLocationsDataStoresGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -14451,13 +18289,16 @@ type ProjectsLocationsCollectionsOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a DataStore. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { - c := &ProjectsLocationsCollectionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to access the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested +// DataStore does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { + c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14465,7 +18306,7 @@ func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14475,7 +18316,7 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Fi // 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 *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { c.ifNoneMatch_ = entityTag return c } @@ -14483,21 +18324,21 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag st // 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 *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { 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 *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresGetCall) 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_ { @@ -14523,14 +18364,16 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.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 *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDataStore.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 *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14549,7 +18392,7 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14561,25 +18404,25 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", + // "description": "Gets a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.operations.get", + // "id": "discoveryengine.projects.locations.dataStores.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14588,45 +18431,53 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.operations.list": +// method id "discoveryengine.projects.locations.dataStores.list": -type ProjectsLocationsCollectionsOperationsListCall struct { +type ProjectsLocationsDataStoresListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists all the DataStores associated with the project. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { - c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. If the caller does not have permission to list DataStoress under +// this location, regardless of whether or not this data store exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { + c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' +func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum +// allowed value is 50. Values above 50 will be coerced to 50. If this +// field is negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -14634,7 +18485,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14644,7 +18495,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.F // 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 *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { c.ifNoneMatch_ = entityTag return c } @@ -14652,21 +18503,21 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag s // 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 *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { 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 *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresListCall) 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_ { @@ -14679,7 +18530,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14687,20 +18538,22 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.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 *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.ServerRespons +// e.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 *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14719,7 +18572,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14731,41 +18584,41 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", + // "description": "Lists all the DataStores associated with the project.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "The standard list filter.", + // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStoress under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+parent}/dataStores", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14777,7 +18630,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca // 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 *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -14795,150 +18648,101 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Conte } } -// method id "discoveryengine.projects.locations.dataStores.completeQuery": +// method id "discoveryengine.projects.locations.dataStores.patch": -type ProjectsLocationsDataStoresCompleteQueryCall struct { - s *Service - dataStore string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CompleteQuery: Completes the specified user input with keyword -// suggestions. +// Patch: Updates a DataStore // -// - dataStore: The parent data store resource name for which the -// completion is performed, such as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store`. -func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { - c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - return c -} - -// IncludeTailSuggestions sets the optional parameter -// "includeTailSuggestions": Indicates if tail suggestions should be -// returned if there are no suggestions that match the full query. Even -// if set to true, if there are suggestions that match the full query, -// those are returned and no tail suggestions are returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) - return c -} - -// Query sets the optional parameter "query": Required. The typeahead -// input used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) - return c -} - -// QueryModel sets the optional parameter "queryModel": Selects data -// model of query suggestions for serving. Currently supported values: * -// `document` - Using suggestions generated from user-imported -// documents. * `search-history` - Using suggestions generated from the -// past history of SearchService.Search API calls. Do not use it when -// there is no traffic for Search API. * `user-event` - Using -// suggestions generated from user-imported search events. * -// `document-completable` - Using suggestions taken directly from -// user-imported document fields marked as completable. Default values: -// * `document` is the default model for regular dataStores. * -// `search-history` is the default model for site search dataStores. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) +// - name: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresPatchCall { + c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore return c } -// UserPseudoId sets the optional parameter "userPseudoId": A unique -// identifier for tracking visitors. For example, this could be -// implemented with an HTTP cookie, which should be able to uniquely -// identify a visitor on a single device. This unique identifier should -// not change if the visitor logs in or out of the website. This field -// should NOT have a fixed value such as `unknown_visitor`. This should -// be the same identifier as UserEvent.user_pseudo_id and -// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded -// string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided DataStore to update. If an unsupported or +// unknown field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { 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 *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { - 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 *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { 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 *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse -// .Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDataStore.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 *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { +func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14957,7 +18761,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14969,45 +18773,34 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Completes the specified user input with keyword suggestions.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}:completeQuery", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.completeQuery", + // "description": "Updates a DataStore", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.patch", // "parameterOrder": [ - // "dataStore" + // "name" // ], // "parameters": { - // "dataStore": { - // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + // "name": { + // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // }, - // "includeTailSuggestions": { - // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", - // "location": "query", - // "type": "boolean" - // }, - // "query": { - // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", - // "location": "query", - // "type": "string" - // }, - // "queryModel": { - // "description": "Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", - // "location": "query", - // "type": "string" - // }, - // "userPseudoId": { - // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "updateMask": { + // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // } // }, - // "path": "v1alpha/{+dataStore}:completeQuery", + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18993,10 +22786,17 @@ type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { // Recommend: Makes a recommendation, which requires a contextual user // event. // -// - servingConfig: Full resource name of the format: +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or // `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` Before you can request recommendations from your model, you -// must create at least one serving config for it. +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your Recommend requests. func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.servingConfig = servingConfig @@ -19106,7 +22906,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...goog // ], // "parameters": { // "servingConfig": { - // "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -19142,6 +22942,8 @@ type ProjectsLocationsDataStoresServingConfigsSearchCall struct { // // - servingConfig: The resource name of the Search serving config, such // as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or // `projects/*/locations/global/collections/default_collection/dataStor // es/default_data_store/servingConfigs/default_serving_config`. This // field is used to identify the serving configuration name, set of @@ -19257,7 +23059,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea // ], // "parameters": { // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 83218c33217..b39814e96c8 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -1020,7 +1020,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1048,7 +1048,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1403,7 +1403,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1431,7 +1431,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -2362,7 +2362,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -2390,7 +2390,7 @@ ], "parameters": { "servingConfig": { - "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -2658,7 +2658,7 @@ } } }, - "revision": "20231026", + "revision": "20231102", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3038,6 +3038,40 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata": { "description": "Metadata for Create Schema LRO.", "id": "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata", @@ -3055,6 +3089,115 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaDataStore": { + "description": "DataStore captures global settings and configs at the DataStore level.", + "id": "GoogleCloudDiscoveryengineV1alphaDataStore", + "properties": { + "contentConfig": { + "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "enum": [ + "CONTENT_CONFIG_UNSPECIFIED", + "NO_CONTENT", + "CONTENT_REQUIRED", + "PUBLIC_WEBSITE" + ], + "enumDescriptions": [ + "Default value.", + "Only contains documents without any Document.content.", + "Only contains documents with Document.content.", + "The data store is used for public website search." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. Timestamp the DataStore was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "defaultSchemaId": { + "description": "Output only. The id of the default Schema asscociated to this data store.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "industryVertical": { + "description": "Immutable. The industry vertical that the data store registers.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical." + ], + "type": "string" + }, + "name": { + "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "solutionTypes": { + "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", + "items": { + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata": { "description": "Metadata for DeleteSchema LRO.", "id": "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata", @@ -3072,6 +3215,283 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaEngine": { + "description": "Metadata that describes the training and serving parameters of an Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngine", + "properties": { + "chatEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", + "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." + }, + "chatEngineMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", + "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", + "readOnly": true + }, + "commonConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", + "description": "Common config spec that specifies the metadata of the engine." + }, + "createTime": { + "description": "Output only. Timestamp the Recommendation Engine was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataStoreIds": { + "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary intializations.", + "items": { + "type": "string" + }, + "type": "array" + }, + "displayName": { + "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", + "type": "string" + }, + "mediaRecommendationEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", + "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." + }, + "name": { + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "recommendationMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", + "description": "Output only. Additional information of a recommendation engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", + "readOnly": true + }, + "searchEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." + }, + "similarDocumentsConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", + "description": "Additional config specs for a `similar-items` engine." + }, + "solutionType": { + "description": "Required. The solutions of the engine.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig": { + "description": "Configurations for a Chat Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", + "properties": { + "agentCreationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", + "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using GetEngine or ListEngine API after engine creation." + }, + "dialogflowAgentToLink": { + "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using GetEngine or ListEngine API after engine creation. Please use Engine.chat_engine_metadata.dialogflow_agent for actual agent association after Engine is created.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig": { + "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using GetEngine or ListEngine API after engine creation.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", + "properties": { + "business": { + "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", + "type": "string" + }, + "defaultLanguageCode": { + "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", + "type": "string" + }, + "timeZone": { + "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata": { + "description": "Additional information of a Chat Engine. Fields in this message are output only.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", + "properties": { + "dialogflowAgent": { + "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig": { + "description": "Common configurations for an Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", + "properties": { + "companyName": { + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig": { + "description": "Additional config specs for a Media Recommendation engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", + "properties": { + "optimizationObjective": { + "description": "The optimization objective e.g. `cvr`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `ctr`, `cvr`. If not specified, we choose default based on engine type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr`", + "type": "string" + }, + "optimizationObjectiveConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", + "description": "Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5)." + }, + "trainingState": { + "description": "The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train engine in order to control cost. If not specified: the default value for `CreateEngine` method is `TRAINING`. The default value for `UpdateEngine` method is to keep the state the same as before.", + "enum": [ + "TRAINING_STATE_UNSPECIFIED", + "PAUSED", + "TRAINING" + ], + "enumDescriptions": [ + "Unspecified training state.", + "The engine training is paused.", + "The engine is training." + ], + "type": "string" + }, + "type": { + "description": "Required. The type of engine e.g. `recommended-for-you`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `recommended-for-you`, `others-you-may-like`, `more-like-this`, `most-popular-items`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig": { + "description": "Custom threshold for `cvr` optimization_objective.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", + "properties": { + "targetField": { + "description": "Required. The name of the field to target. Currently supported values: `watch-percentage`, `watch-time`.", + "type": "string" + }, + "targetFieldValueFloat": { + "description": "Required. The threshold to be applied to the target (e.g., 0.5).", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata": { + "description": "Additional information of a recommendation engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", + "properties": { + "dataState": { + "description": "Output only. The state of data requirements for this engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state even if serving state is `ACTIVE`: engines were trained successfully before, but cannot be refreshed because the underlying engine no longer has sufficient data for training.", + "enum": [ + "DATA_STATE_UNSPECIFIED", + "DATA_OK", + "DATA_ERROR" + ], + "enumDescriptions": [ + "Unspecified default value, should never be explicitly set.", + "The engine has sufficient training data.", + "The engine does not have sufficient training data. Error messages can be queried via Stackdriver." + ], + "readOnly": true, + "type": "string" + }, + "lastTuneTime": { + "description": "Output only. The timestamp when the latest successful tune finished. Only applicable on Media Recommendation engines.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "servingState": { + "description": "Output only. The serving state of the engine: `ACTIVE`, `NOT_ACTIVE`.", + "enum": [ + "SERVING_STATE_UNSPECIFIED", + "INACTIVE", + "ACTIVE", + "TUNED" + ], + "enumDescriptions": [ + "Unspecified serving state.", + "The engine is not serving.", + "The engine is serving and can be queried.", + "The engine is trained on tuned hyperparameters and can be queried." + ], + "readOnly": true, + "type": "string" + }, + "tuningOperation": { + "description": "Output only. The latest tune operation id associated with the engine. Only applicable on Media Recommendation engines. If present, this operation id can be used to determine if there is an ongoing tune for this engine. To check the operation status, send the GetOperation request with this operation id in the engine resource format. If no tuning has happened for this engine, the string is empty.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig": { + "description": "Configurations for a Search Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "properties": { + "searchAddOns": { + "description": "The add-on that this search engine enables.", + "items": { + "enum": [ + "SEARCH_ADD_ON_UNSPECIFIED", + "SEARCH_ADD_ON_LLM" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Large language model add-on." + ], + "type": "string" + }, + "type": "array" + }, + "searchTier": { + "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, please check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", + "enum": [ + "SEARCH_TIER_UNSPECIFIED", + "SEARCH_TIER_STANDARD", + "SEARCH_TIER_ENTERPRISE" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Standard tier.", + "Enterprise tier." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig": { + "description": "Additional config specs for a `similar-items` engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaFieldConfig": { "description": "Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.", "id": "GoogleCloudDiscoveryengineV1alphaFieldConfig", @@ -3648,6 +4068,23 @@ "properties": {}, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata": { + "description": "Metadata associated with a tune operation.", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata", + "properties": { + "engine": { + "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse": { + "description": "Response associated with a tune operation.", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata", diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 6c8c09ecd85..df1d71a63ca 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -1290,6 +1290,76 @@ func (s *GoogleCloudDiscoveryengineV1UpdateSchemaMetadata) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata: Metadata +// related to the progress of the DataStoreService.CreateDataStore +// operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata: Metadata +// related to the progress of the EngineService.CreateEngine operation. +// This will be returned by the google.longrunning.Operation.metadata +// field. +type GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata: Metadata for // Create Schema LRO. type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { @@ -1323,6 +1393,157 @@ func (s *GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata) MarshalJSON() ([ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaDataStore: DataStore captures global +// settings and configs at the DataStore level. +type GoogleCloudDiscoveryengineV1alphaDataStore struct { + // ContentConfig: Immutable. The content config of the data store. If + // this field is unset, the server behavior defaults to + // ContentConfig.NO_CONTENT. + // + // Possible values: + // "CONTENT_CONFIG_UNSPECIFIED" - Default value. + // "NO_CONTENT" - Only contains documents without any + // Document.content. + // "CONTENT_REQUIRED" - Only contains documents with Document.content. + // "PUBLIC_WEBSITE" - The data store is used for public website + // search. + ContentConfig string `json:"contentConfig,omitempty"` + + // CreateTime: Output only. Timestamp the DataStore was created at. + CreateTime string `json:"createTime,omitempty"` + + // DefaultSchemaId: Output only. The id of the default Schema + // asscociated to this data store. + DefaultSchemaId string `json:"defaultSchemaId,omitempty"` + + // DisplayName: Required. The data store display name. This field must + // be a UTF-8 encoded string with a length limit of 128 characters. + // Otherwise, an INVALID_ARGUMENT error is returned. + DisplayName string `json:"displayName,omitempty"` + + // IndustryVertical: Immutable. The industry vertical that the data + // store registers. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not + // specific to any industry vertical. + // "MEDIA" - The media industry vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + + // Name: Immutable. The full resource name of the data store. Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/d + // ataStores/{data_store_id}`. This field must be a UTF-8 encoded string + // with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // SolutionTypes: The solutions that the data store enrolls. Available + // solutions for each industry_vertical: * `MEDIA`: + // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * + // `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. + // Other solutions cannot be enrolled. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + SolutionTypes []string `json:"solutionTypes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentConfig") 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. "ContentConfig") 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 *GoogleCloudDiscoveryengineV1alphaDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDataStore + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata: Metadata +// related to the progress of the DataStoreService.DeleteDataStore +// operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata: Metadata +// related to the progress of the EngineService.DeleteEngine operation. +// This will be returned by the google.longrunning.Operation.metadata +// field. +type GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + 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 *GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata: Metadata for // DeleteSchema LRO. type GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata struct { @@ -1356,6 +1577,487 @@ func (s *GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata) MarshalJSON() ([ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaEngine: Metadata that describes the +// training and serving parameters of an Engine. +type GoogleCloudDiscoveryengineV1alphaEngine struct { + // ChatEngineConfig: Configurations for the Chat Engine. Only applicable + // if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` + + // ChatEngineMetadata: Output only. Additional information of the Chat + // Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineMetadata *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + + // CommonConfig: Common config spec that specifies the metadata of the + // engine. + CommonConfig *GoogleCloudDiscoveryengineV1alphaEngineCommonConfig `json:"commonConfig,omitempty"` + + // CreateTime: Output only. Timestamp the Recommendation Engine was + // created at. + CreateTime string `json:"createTime,omitempty"` + + // DataStoreIds: The data stores associated with this engine. For + // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of + // engines, they can only associate with at most one data store. If + // solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same + // Collection can be associated here. Note that when used in + // CreateEngineRequest, one DataStore id must be provided as the system + // will use it for necessary intializations. + DataStoreIds []string `json:"dataStoreIds,omitempty"` + + // DisplayName: Required. The display name of the engine. Should be + // human readable. UTF-8 encoded string with limit of 1024 characters. + DisplayName string `json:"displayName,omitempty"` + + // MediaRecommendationEngineConfig: Configurations for the Media Engine. + // Only applicable on the data stores with solution_type + // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. + MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + + // Name: Immutable. The fully qualified resource name of the engine. + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. Format: + // `projects/{project_number}/locations/{location}/collections/{collectio + // n}/engines/{engine}` engine should be 1-63 characters, and valid + // characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is + // returned. + Name string `json:"name,omitempty"` + + // RecommendationMetadata: Output only. Additional information of a + // recommendation engine. Only applicable if solution_type is + // SOLUTION_TYPE_RECOMMENDATION. + RecommendationMetadata *GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata `json:"recommendationMetadata,omitempty"` + + // SearchEngineConfig: Configurations for the Search Engine. Only + // applicable if solution_type is SOLUTION_TYPE_SEARCH. + SearchEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` + + // SimilarDocumentsConfig: Additional config specs for a `similar-items` + // engine. + SimilarDocumentsConfig *GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig `json:"similarDocumentsConfig,omitempty"` + + // SolutionType: Required. The solutions of the engine. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + SolutionType string `json:"solutionType,omitempty"` + + // UpdateTime: Output only. Timestamp the Recommendation Engine was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") 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. "ChatEngineConfig") 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 *GoogleCloudDiscoveryengineV1alphaEngine) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngine + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig: +// Configurations for a Chat Engine. +type GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig struct { + // AgentCreationConfig: The configurationt generate the Dialogflow agent + // that is associated to this Engine. Note that these configurations are + // one-time consumed by and passed to Dialogflow service. It means they + // cannot be retrieved using GetEngine or ListEngine API after engine + // creation. + AgentCreationConfig *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` + + // DialogflowAgentToLink: The resource name of an exist Dialogflow agent + // to link to this Chat Engine. Customers can either provide + // `agent_creation_config` to create agent or provide an agent name that + // links the agent with the Chat engine. Format: + // `projects//locations//agents/`. Note that the + // `dialogflow_agent_to_link` are one-time consumed by and passed to + // Dialogflow service. It means they cannot be retrieved using GetEngine + // or ListEngine API after engine creation. Please use + // Engine.chat_engine_metadata.dialogflow_agent for actual agent + // association after Engine is created. + DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") + // 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. "AgentCreationConfig") 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 *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationCo +// nfig: Configurations for generating a Dialogflow agent. Note that +// these configurations are one-time consumed by and passed to +// Dialogflow service. It means they cannot be retrieved using GetEngine +// or ListEngine API after engine creation. +type GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig struct { + // Business: Name of the company, organization or other entity that the + // agent represents. Used for knowledge connector LLM prompt and for + // knowledge search. + Business string `json:"business,omitempty"` + + // DefaultLanguageCode: Required. The default language of the agent as a + // language tag. See Language Support + // (https://cloud.google.com/dialogflow/docs/reference/language) for a + // list of the currently supported language codes. + DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` + + // TimeZone: Required. The time zone of the agent from the time zone + // database (https://www.iana.org/time-zones), e.g., America/New_York, + // Europe/Paris. + TimeZone string `json:"timeZone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Business") 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. "Business") 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 *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata: Additional +// information of a Chat Engine. Fields in this message are output only. +type GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata struct { + // DialogflowAgent: The resource name of a Dialogflow agent, that this + // Chat Engine refers to. Format: `projects//locations//agents/`. + DialogflowAgent string `json:"dialogflowAgent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DialogflowAgent") 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. "DialogflowAgent") 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 *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEngineCommonConfig: Common +// configurations for an Engine. +type GoogleCloudDiscoveryengineV1alphaEngineCommonConfig struct { + // CompanyName: The name of the company, business or entity that is + // associated with the engine. Setting this may help improve LLM related + // features. + CompanyName string `json:"companyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompanyName") 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. "CompanyName") 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 *GoogleCloudDiscoveryengineV1alphaEngineCommonConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineCommonConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig +// : Additional config specs for a Media Recommendation engine. +type GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig struct { + // OptimizationObjective: The optimization objective e.g. `cvr`. This + // field together with optimization_objective describe engine metadata + // to use to control engine training and serving. Currently supported + // values: `ctr`, `cvr`. If not specified, we choose default based on + // engine type. Default depends on type of recommendation: + // `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` + OptimizationObjective string `json:"optimizationObjective,omitempty"` + + // OptimizationObjectiveConfig: Name and value of the custom threshold + // for cvr optimization_objective. For target_field `watch-time`, + // target_field_value must be an integer value indicating the media + // progress time in seconds between (0, 86400] (excludes 0, includes + // 86400) (e.g., 90). For target_field `watch-percentage`, the + // target_field_value must be a valid float value between (0, 1.0] + // (excludes 0, includes 1.0) (e.g., 0.5). + OptimizationObjectiveConfig *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig `json:"optimizationObjectiveConfig,omitempty"` + + // TrainingState: The training state that the engine is in (e.g. + // `TRAINING` or `PAUSED`). Since part of the cost of running the + // service is frequency of training - this can be used to determine when + // to train engine in order to control cost. If not specified: the + // default value for `CreateEngine` method is `TRAINING`. The default + // value for `UpdateEngine` method is to keep the state the same as + // before. + // + // Possible values: + // "TRAINING_STATE_UNSPECIFIED" - Unspecified training state. + // "PAUSED" - The engine training is paused. + // "TRAINING" - The engine is training. + TrainingState string `json:"trainingState,omitempty"` + + // Type: Required. The type of engine e.g. `recommended-for-you`. This + // field together with optimization_objective describe engine metadata + // to use to control engine training and serving. Currently supported + // values: `recommended-for-you`, `others-you-may-like`, + // `more-like-this`, `most-popular-items`. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "OptimizationObjective") 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. "OptimizationObjective") 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 *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig +// OptimizationObjectiveConfig: Custom threshold for `cvr` +// optimization_objective. +type GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig struct { + // TargetField: Required. The name of the field to target. Currently + // supported values: `watch-percentage`, `watch-time`. + TargetField string `json:"targetField,omitempty"` + + // TargetFieldValueFloat: Required. The threshold to be applied to the + // target (e.g., 0.5). + TargetFieldValueFloat float64 `json:"targetFieldValueFloat,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetField") 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. "TargetField") 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 *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig + var s1 struct { + TargetFieldValueFloat gensupport.JSONFloat64 `json:"targetFieldValueFloat"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.TargetFieldValueFloat = float64(s1.TargetFieldValueFloat) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata: +// Additional information of a recommendation engine. +type GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata struct { + // DataState: Output only. The state of data requirements for this + // engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the + // data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state + // even if serving state is `ACTIVE`: engines were trained successfully + // before, but cannot be refreshed because the underlying engine no + // longer has sufficient data for training. + // + // Possible values: + // "DATA_STATE_UNSPECIFIED" - Unspecified default value, should never + // be explicitly set. + // "DATA_OK" - The engine has sufficient training data. + // "DATA_ERROR" - The engine does not have sufficient training data. + // Error messages can be queried via Stackdriver. + DataState string `json:"dataState,omitempty"` + + // LastTuneTime: Output only. The timestamp when the latest successful + // tune finished. Only applicable on Media Recommendation engines. + LastTuneTime string `json:"lastTuneTime,omitempty"` + + // ServingState: Output only. The serving state of the engine: `ACTIVE`, + // `NOT_ACTIVE`. + // + // Possible values: + // "SERVING_STATE_UNSPECIFIED" - Unspecified serving state. + // "INACTIVE" - The engine is not serving. + // "ACTIVE" - The engine is serving and can be queried. + // "TUNED" - The engine is trained on tuned hyperparameters and can be + // queried. + ServingState string `json:"servingState,omitempty"` + + // TuningOperation: Output only. The latest tune operation id associated + // with the engine. Only applicable on Media Recommendation engines. If + // present, this operation id can be used to determine if there is an + // ongoing tune for this engine. To check the operation status, send the + // GetOperation request with this operation id in the engine resource + // format. If no tuning has happened for this engine, the string is + // empty. + TuningOperation string `json:"tuningOperation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataState") 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. "DataState") 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 *GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig: +// Configurations for a Search Engine. +type GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig struct { + // SearchAddOns: The add-on that this search engine enables. + // + // Possible values: + // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is + // unspecified. This is invalid to use. + // "SEARCH_ADD_ON_LLM" - Large language model add-on. + SearchAddOns []string `json:"searchAddOns,omitempty"` + + // SearchTier: The search feature tier of this engine. Different tiers + // might have different pricing. To learn more, please check the pricing + // documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not + // specified. + // + // Possible values: + // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is + // unspecified. This is invalid to use. + // "SEARCH_TIER_STANDARD" - Standard tier. + // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. + SearchTier string `json:"searchTier,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SearchAddOns") 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. "SearchAddOns") 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 *GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig: +// Additional config specs for a `similar-items` engine. +type GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig struct { +} + // GoogleCloudDiscoveryengineV1alphaFieldConfig: Configurations for // fields of a schema. For example, configuring a field is indexable, or // searchable. @@ -2231,6 +2933,43 @@ func (s *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason) MarshalJSON() type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure struct { } +// GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata: Metadata +// associated with a tune operation. +type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { + // Engine: Required. The resource name of the engine that this tune + // applies to. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collec + // tion_id}/engines/{engine_id}` + Engine string `json:"engine,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Engine") 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. "Engine") 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 *GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaTuneEngineResponse: Response +// associated with a tune operation. +type GoogleCloudDiscoveryengineV1alphaTuneEngineResponse struct { +} + // GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for // UpdateSchema LRO. type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata struct { @@ -10607,10 +11346,17 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { // Recommend: Makes a recommendation, which requires a contextual user // event. // -// - servingConfig: Full resource name of the format: +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or // `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` Before you can request recommendations from your model, you -// must create at least one serving config for it. +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your Recommend requests. func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.servingConfig = servingConfig @@ -10720,7 +11466,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o // ], // "parameters": { // "servingConfig": { - // "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -10756,6 +11502,8 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { // // - servingConfig: The resource name of the Search serving config, such // as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or // `projects/*/locations/global/collections/default_collection/dataStor // es/default_data_store/servingConfigs/default_serving_config`. This // field is used to identify the serving configuration name, set of @@ -10869,7 +11617,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts // ], // "parameters": { // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -12477,10 +13225,17 @@ type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { // Recommend: Makes a recommendation, which requires a contextual user // event. // -// - servingConfig: Full resource name of the format: +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or // `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` Before you can request recommendations from your model, you -// must create at least one serving config for it. +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your Recommend requests. func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.servingConfig = servingConfig @@ -12590,7 +13345,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts // ], // "parameters": { // "servingConfig": { - // "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -12626,6 +13381,8 @@ type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { // // - servingConfig: The resource name of the Search serving config, such // as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or // `projects/*/locations/global/collections/default_collection/dataStor // es/default_data_store/servingConfigs/default_serving_config`. This // field is used to identify the serving configuration name, set of @@ -12739,7 +13496,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. // ], // "parameters": { // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -17332,10 +18089,17 @@ type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { // Recommend: Makes a recommendation, which requires a contextual user // event. // -// - servingConfig: Full resource name of the format: +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or // `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` Before you can request recommendations from your model, you -// must create at least one serving config for it. +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your Recommend requests. func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.servingConfig = servingConfig @@ -17445,7 +18209,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...goog // ], // "parameters": { // "servingConfig": { - // "description": "Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model, you must create at least one serving config for it.", + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your Recommend requests.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, @@ -17481,6 +18245,8 @@ type ProjectsLocationsDataStoresServingConfigsSearchCall struct { // // - servingConfig: The resource name of the Search serving config, such // as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or // `projects/*/locations/global/collections/default_collection/dataStor // es/default_data_store/servingConfigs/default_serving_config`. This // field is used to identify the serving configuration name, set of @@ -17594,7 +18360,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea // ], // "parameters": { // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, diff --git a/firebasedynamiclinks/v1/firebasedynamiclinks-api.json b/firebasedynamiclinks/v1/firebasedynamiclinks-api.json index 5b56704def1..20fa37dc523 100644 --- a/firebasedynamiclinks/v1/firebasedynamiclinks-api.json +++ b/firebasedynamiclinks/v1/firebasedynamiclinks-api.json @@ -224,7 +224,7 @@ } } }, - "revision": "20230906", + "revision": "20231107", "rootUrl": "https://firebasedynamiclinks.googleapis.com/", "schemas": { "AnalyticsInfo": { @@ -668,7 +668,7 @@ "type": "object" }, "GetIosPostInstallAttributionResponse": { - "description": "Response for iSDK to execute strong match flow for post-install attribution.", + "description": "Response for iSDK to execute strong match flow for post-install attribution. Information of the resolved FDL link.", "id": "GetIosPostInstallAttributionResponse", "properties": { "appMinimumVersion": { diff --git a/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go b/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go index 2f5aa5fa399..bd0b0651f55 100644 --- a/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go +++ b/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go @@ -843,7 +843,8 @@ func (s *GetIosPostInstallAttributionRequest) MarshalJSON() ([]byte, error) { } // GetIosPostInstallAttributionResponse: Response for iSDK to execute -// strong match flow for post-install attribution. +// strong match flow for post-install attribution. Information of the +// resolved FDL link. type GetIosPostInstallAttributionResponse struct { // AppMinimumVersion: The minimum version for app, specified by dev // through ?imv= parameter. Return to iSDK to allow app to evaluate if diff --git a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json index 4b95d4f10fb..549a8a4acd9 100644 --- a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json +++ b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-api.json @@ -2637,7 +2637,7 @@ } } }, - "revision": "20230921", + "revision": "20231106", "rootUrl": "https://prod-tt-sasportal.googleapis.com/", "schemas": { "SasPortalAssignment": { @@ -3185,11 +3185,6 @@ "format": "int32", "type": "integer" }, - "antennaGainNewField": { - "description": "As above, but as a DoubleValue.", - "format": "double", - "type": "number" - }, "antennaModel": { "description": "If an external antenna is used, the antenna model is optionally provided in this field. The string has a maximum length of 128 octets.", "type": "string" @@ -3203,11 +3198,6 @@ "format": "int32", "type": "integer" }, - "eirpCapabilityNewField": { - "description": "As above, but as a DoubleValue.", - "format": "double", - "type": "number" - }, "height": { "description": "Device antenna height in meters. When the `heightType` parameter value is \"AGL\", the antenna height should be given relative to ground level. When the `heightType` parameter value is \"AMSL\", it is given with respect to WGS84 datum.", "format": "double", diff --git a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go index b38bc0fbc12..f0f1abb1b6e 100644 --- a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go +++ b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go @@ -1221,9 +1221,6 @@ type SasPortalInstallationParams struct { // with a value between -127 and +128 (dBi) inclusive. AntennaGain int64 `json:"antennaGain,omitempty"` - // AntennaGainNewField: As above, but as a DoubleValue. - AntennaGainNewField float64 `json:"antennaGainNewField,omitempty"` - // AntennaModel: If an external antenna is used, the antenna model is // optionally provided in this field. The string has a maximum length of // 128 octets. @@ -1239,9 +1236,6 @@ type SasPortalInstallationParams struct { // allowable EIRP in units of dBm/10MHz for device category. EirpCapability int64 `json:"eirpCapability,omitempty"` - // EirpCapabilityNewField: As above, but as a DoubleValue. - EirpCapabilityNewField float64 `json:"eirpCapabilityNewField,omitempty"` - // Height: Device antenna height in meters. When the `heightType` // parameter value is "AGL", the antenna height should be given relative // to ground level. When the `heightType` parameter value is "AMSL", it @@ -1313,21 +1307,17 @@ func (s *SasPortalInstallationParams) MarshalJSON() ([]byte, error) { func (s *SasPortalInstallationParams) UnmarshalJSON(data []byte) error { type NoMethod SasPortalInstallationParams var s1 struct { - AntennaGainNewField gensupport.JSONFloat64 `json:"antennaGainNewField"` - EirpCapabilityNewField gensupport.JSONFloat64 `json:"eirpCapabilityNewField"` - Height gensupport.JSONFloat64 `json:"height"` - HorizontalAccuracy gensupport.JSONFloat64 `json:"horizontalAccuracy"` - Latitude gensupport.JSONFloat64 `json:"latitude"` - Longitude gensupport.JSONFloat64 `json:"longitude"` - VerticalAccuracy gensupport.JSONFloat64 `json:"verticalAccuracy"` + Height gensupport.JSONFloat64 `json:"height"` + HorizontalAccuracy gensupport.JSONFloat64 `json:"horizontalAccuracy"` + Latitude gensupport.JSONFloat64 `json:"latitude"` + Longitude gensupport.JSONFloat64 `json:"longitude"` + VerticalAccuracy gensupport.JSONFloat64 `json:"verticalAccuracy"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.AntennaGainNewField = float64(s1.AntennaGainNewField) - s.EirpCapabilityNewField = float64(s1.EirpCapabilityNewField) s.Height = float64(s1.Height) s.HorizontalAccuracy = float64(s1.HorizontalAccuracy) s.Latitude = float64(s1.Latitude) diff --git a/vmwareengine/v1/vmwareengine-api.json b/vmwareengine/v1/vmwareengine-api.json index 2fe54e53f7d..c8b7f1556e5 100644 --- a/vmwareengine/v1/vmwareengine-api.json +++ b/vmwareengine/v1/vmwareengine-api.json @@ -177,6 +177,326 @@ } }, "resources": { + "global": { + "methods": { + "getDnsBindPermission": { + "description": "Gets all the principals having bind permission on the intranet VPC associated with the consumer project granted by the Grant API.", + "flatPath": "v1/projects/{projectsId}/locations/global/dnsBindPermission", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.global.getDnsBindPermission", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource which stores the users/service accounts having the permission to bind to the corresponding intranet VPC of the consumer project. DnsBindPermission is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/dnsBindPermission`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/dnsBindPermission$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "DnsBindPermission" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "dnsBindPermission": { + "methods": { + "grant": { + "description": "Grants the bind permission to the customer provided principal(user / service account) to bind their DNS zone with the intranet VPC associated with the project.", + "flatPath": "v1/projects/{projectsId}/locations/global/dnsBindPermission:grant", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.global.dnsBindPermission.grant", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource which stores the users/service accounts having the permission to bind to the corresponding intranet VPC of the consumer project. DnsBindPermission is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/dnsBindPermission`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/dnsBindPermission$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:grant", + "request": { + "$ref": "GrantDnsBindPermissionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "revoke": { + "description": "Revokes the bind permission from the customer provided principal(user / service account) on the intranet VPC associated with the consumer project.", + "flatPath": "v1/projects/{projectsId}/locations/global/dnsBindPermission:revoke", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.global.dnsBindPermission.revoke", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource which stores the users/service accounts having the permission to bind to the corresponding intranet VPC of the consumer project. DnsBindPermission is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/dnsBindPermission`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/dnsBindPermission$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:revoke", + "request": { + "$ref": "RevokeDnsBindPermissionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "networkPeerings": { + "methods": { + "create": { + "description": "Creates a new network peering between the peer network and VMware Engine network provided in a `NetworkPeering` resource.", + "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.global.networkPeerings.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "networkPeeringId": { + "description": "Required. The user-provided identifier of the new `NetworkPeering`. This identifier must be unique among `NetworkPeering` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the location to create the new network peering in. This value is always `global`, because `NetworkPeering` is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/networkPeerings", + "request": { + "$ref": "NetworkPeering" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a `NetworkPeering` resource. When a network peering is deleted for a VMware Engine network, the peer network becomes inaccessible to that VMware Engine network.", + "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings/{networkPeeringsId}", + "httpMethod": "DELETE", + "id": "vmwareengine.projects.locations.global.networkPeerings.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the network peering to be deleted. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/networkPeerings/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a `NetworkPeering` resource by its resource name. The resource contains details of the network peering, such as peered networks, import and export custom route configurations, and peering state.", + "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings/{networkPeeringsId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.global.networkPeerings.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the network peering to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/networkPeerings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "NetworkPeering" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `NetworkPeering` resources in a given project.", + "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.global.networkPeerings.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of network peerings, you can exclude the ones named `example-peering` by specifying `name != \"example-peering\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-peering\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-peering-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-peering-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of network peerings to return in one page. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListNetworkPeerings` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNetworkPeerings` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the location (global) to query for network peerings. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/networkPeerings", + "response": { + "$ref": "ListNetworkPeeringsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Modifies a `NetworkPeering` resource. Only the `description` field can be updated. Only fields specified in `updateMask` are applied.", + "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings/{networkPeeringsId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.global.networkPeerings.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the network peering. Resource names are scheme-less URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/networkPeerings/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `NetworkPeering` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "NetworkPeering" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "peeringRoutes": { + "methods": { + "list": { + "description": "Lists the network peering routes exchanged over a peering connection.", + "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings/{networkPeeringsId}/peeringRoutes", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.global.networkPeerings.peeringRoutes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. Currently, only filtering on the `direction` field is supported. To return routes imported from the peer network, provide \"direction=INCOMING\". To return routes exported from the VMware Engine network, provide \"direction=OUTGOING\". Other filter expressions return an error.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of peering routes to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListPeeringRoutes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPeeringRoutes` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the network peering to retrieve peering routes from. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/networkPeerings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/peeringRoutes", + "response": { + "$ref": "ListPeeringRoutesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, "networkPolicies": { "methods": { "create": { @@ -247,6 +567,42 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "fetchExternalAddresses": { + "description": "Lists external IP addresses assigned to VMware workload VMs within the scope of the given network policy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}:fetchExternalAddresses", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.networkPolicies.fetchExternalAddresses", + "parameterOrder": [ + "networkPolicy" + ], + "parameters": { + "networkPolicy": { + "description": "Required. The resource name of the network policy to query for assigned external IP addresses. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of external IP addresses to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the subsequent page. When paginating, all parameters provided to `FetchNetworkPolicyExternalAddresses`, except for `page_size` and `page_token`, must match the call that provided the page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+networkPolicy}:fetchExternalAddresses", + "response": { + "$ref": "FetchNetworkPolicyExternalAddressesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Retrieves a `NetworkPolicy` resource by its resource name.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", @@ -357,27 +713,211 @@ "https://www.googleapis.com/auth/cloud-platform" ] } - } - }, - "nodeTypes": { - "methods": { - "get": { - "description": "Gets details of a single `NodeType`.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes/{nodeTypesId}", - "httpMethod": "GET", - "id": "vmwareengine.projects.locations.nodeTypes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the node type to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/nodeTypes/[^/]+$", - "required": true, - "type": "string" - } - }, + }, + "resources": { + "externalAccessRules": { + "methods": { + "create": { + "description": "Creates a new external access rule in a given network policy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "externalAccessRuleId": { + "description": "Required. The user-provided identifier of the `ExternalAccessRule` to be created. This identifier must be unique among `ExternalAccessRule` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the network policy to create a new external access firewall rule in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/externalAccessRules", + "request": { + "$ref": "ExternalAccessRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single external access rule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules/{externalAccessRulesId}", + "httpMethod": "DELETE", + "id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the external access firewall rule to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+/externalAccessRules/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single external access rule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules/{externalAccessRulesId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the external access firewall rule to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+/externalAccessRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ExternalAccessRule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `ExternalAccessRule` resources in the specified network policy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of external access rules, you can exclude the ones named `example-rule` by specifying `name != \"example-rule\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-rule\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-rule-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-rule-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of external access rules to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListExternalAccessRulesRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExternalAccessRulesRequest` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the network policy to query for external access firewall rules. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/externalAccessRules", + "response": { + "$ref": "ListExternalAccessRulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single external access rule. Only fields specified in `update_mask` are applied.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules/{externalAccessRulesId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of this external access rule. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+/externalAccessRules/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `ExternalAccessRule` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "ExternalAccessRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "nodeTypes": { + "methods": { + "get": { + "description": "Gets details of a single `NodeType`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes/{nodeTypesId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.nodeTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the node type to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nodeTypes/[^/]+$", + "required": true, + "type": "string" + } + }, "path": "v1/{+name}", "response": { "$ref": "NodeType" @@ -635,6 +1175,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getDnsForwarding": { + "description": "Gets details of the `DnsForwarding` config.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/dnsForwarding", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.getDnsForwarding", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of a `DnsForwarding` to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/dnsForwarding$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "DnsForwarding" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getIamPolicy": { "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:getIamPolicy", @@ -875,6 +1440,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", "required": true, "type": "string" + }, + "username": { + "description": "Optional. The username of the user to be queried for credentials. The default value of this field is CloudOwner@gve.local. The provided value must be one of the following: CloudOwner@gve.local, solution-user-01@gve.local, solution-user-02@gve.local, solution-user-03@gve.local, solution-user-04@gve.local, solution-user-05@gve.local, zertoadmin@gve.local.", + "location": "query", + "type": "string" } }, "path": "v1/{+privateCloud}:showVcenterCredentials", @@ -901,85 +1471,837 @@ "required": true, "type": "string" } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "undelete": { + "description": "Restores a private cloud that was previously scheduled for deletion by `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to the time when deletion can no longer be reversed.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:undelete", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.undelete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the private cloud scheduled for deletion. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:undelete", + "request": { + "$ref": "UndeletePrivateCloudRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateDnsForwarding": { + "description": "Updates the parameters of the `DnsForwarding` config, like associated domains. Only fields specified in `update_mask` are applied.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/dnsForwarding", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.privateClouds.updateDnsForwarding", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of this DNS profile. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/dnsForwarding$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `DnsForwarding` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "DnsForwarding" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "clusters": { + "methods": { + "create": { + "description": "Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient [node quota](https://cloud.google.com/vmware-engine/quotas).", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.clusters.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "clusterId": { + "description": "Required. The user-provided identifier of the new `Cluster`. This identifier must be unique among clusters within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to create a new cluster in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/clusters", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a `Cluster` resource. To avoid unintended data loss, migrate or gracefully shut down any workloads running on the cluster before deletion. You cannot delete the management cluster of a private cloud using this method.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + "httpMethod": "DELETE", + "id": "vmwareengine.projects.locations.privateClouds.clusters.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the cluster to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a `Cluster` resource by its resource name.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.clusters.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The cluster resource name to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Cluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:getIamPolicy", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.clusters.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `Cluster` resources in a given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.clusters.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": " To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-cluster\") (nodeCount = \"3\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-cluster-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-cluster-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of clusters to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListClusters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListClusters` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to query for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/clusters", + "response": { + "$ref": "ListClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Modifies a `Cluster` resource. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.privateClouds.clusters.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of this cluster. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `Cluster` resource by the update. The fields specified in the `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:setIamPolicy", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.clusters.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:testIamPermissions", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.clusters.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "nodes": { + "methods": { + "get": { + "description": "Gets details of a single node.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}/nodes/{nodesId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.clusters.nodes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the node to retrieve. For example: `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+/nodes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Node" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists nodes in a given cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}/nodes", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.clusters.nodes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of nodes to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListNodes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNodes` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the cluster to be queried for nodes. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/nodes", + "response": { + "$ref": "ListNodesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "externalAddresses": { + "methods": { + "create": { + "description": "Creates a new `ExternalAddress` resource in a given private cloud. The network policy that corresponds to the private cloud must have the external IP address network service enabled (`NetworkPolicy.external_ip`).", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.externalAddresses.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "externalAddressId": { + "description": "Required. The user-provided identifier of the `ExternalAddress` to be created. This identifier must be unique among `ExternalAddress` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to create a new external IP address in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/externalAddresses", + "request": { + "$ref": "ExternalAddress" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single external IP address. When you delete an external IP address, connectivity between the external IP address and the corresponding internal IP address is lost.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses/{externalAddressesId}", + "httpMethod": "DELETE", + "id": "vmwareengine.projects.locations.privateClouds.externalAddresses.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the external IP address to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/externalAddresses/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single external IP address.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses/{externalAddressesId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.externalAddresses.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the external IP address to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/externalAddresses/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ExternalAddress" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists external IP addresses assigned to VMware workload VMs in a given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.externalAddresses.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of IP addresses, you can exclude the ones named `example-ip` by specifying `name != \"example-ip\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-ip\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-ip-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-ip-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of external IP addresses to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListExternalAddresses` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExternalAddresses` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to be queried for external IP addresses. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/externalAddresses", + "response": { + "$ref": "ListExternalAddressesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single external IP address. Only fields specified in `update_mask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses/{externalAddressesId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.privateClouds.externalAddresses.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of this external IP address. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/externalAddresses/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `ExternalAddress` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "ExternalAddress" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "hcxActivationKeys": { + "methods": { + "create": { + "description": "Creates a new HCX activation key in a given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "hcxActivationKeyId": { + "description": "Required. The user-provided identifier of the `HcxActivationKey` to be created. This identifier must be unique among `HcxActivationKey` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to create the key for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/hcxActivationKeys", + "request": { + "$ref": "HcxActivationKey" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a `HcxActivationKey` resource by its resource name.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the HCX activation key to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "HcxActivationKey" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:getIamPolicy", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `HcxActivationKey` resources in a given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of HCX activation keys to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListHcxActivationKeys` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListHcxActivationKeys` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to be queried for HCX activation keys. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/hcxActivationKeys", + "response": { + "$ref": "ListHcxActivationKeysResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:setIamPolicy", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:testIamPermissions", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } }, - "undelete": { - "description": "Restores a private cloud that was previously scheduled for deletion by `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to the time when deletion can no longer be reversed.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:undelete", - "httpMethod": "POST", - "id": "vmwareengine.projects.locations.privateClouds.undelete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The resource name of the private cloud scheduled for deletion. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:undelete", - "request": { - "$ref": "UndeletePrivateCloudRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "clusters": { + "loggingServers": { "methods": { "create": { - "description": "Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient [node quota](https://cloud.google.com/vmware-engine/quotas).", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", + "description": "Create a new logging server for a given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers", "httpMethod": "POST", - "id": "vmwareengine.projects.locations.privateClouds.clusters.create", + "id": "vmwareengine.projects.locations.privateClouds.loggingServers.create", "parameterOrder": [ "parent" ], "parameters": { - "clusterId": { - "description": "Required. The user-provided identifier of the new `Cluster`. This identifier must be unique among clusters within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "loggingServerId": { + "description": "Required. The user-provided identifier of the `LoggingServer` to be created. This identifier must be unique among `LoggingServer` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of the private cloud to create a new cluster in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "description": "Required. The resource name of the private cloud to create a new Logging Server in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", "required": true, "type": "string" }, "requestId": { - "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" - }, - "validateOnly": { - "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", - "location": "query", - "type": "boolean" } }, - "path": "v1/{+parent}/clusters", + "path": "v1/{+parent}/loggingServers", "request": { - "$ref": "Cluster" + "$ref": "LoggingServer" }, "response": { "$ref": "Operation" @@ -989,23 +2311,23 @@ ] }, "delete": { - "description": "Deletes a `Cluster` resource. To avoid unintended data loss, migrate or gracefully shut down any workloads running on the cluster before deletion. You cannot delete the management cluster of a private cloud using this method.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + "description": "Deletes a single logging server.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers/{loggingServersId}", "httpMethod": "DELETE", - "id": "vmwareengine.projects.locations.privateClouds.clusters.delete", + "id": "vmwareengine.projects.locations.privateClouds.loggingServers.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The resource name of the cluster to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "description": "Required. The resource name of the logging server to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/loggingServers/[^/]+$", "required": true, "type": "string" }, "requestId": { - "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" } @@ -1019,72 +2341,41 @@ ] }, "get": { - "description": "Retrieves a `Cluster` resource by its resource name.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + "description": "Gets details of a logging server.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers/{loggingServersId}", "httpMethod": "GET", - "id": "vmwareengine.projects.locations.privateClouds.clusters.get", + "id": "vmwareengine.projects.locations.privateClouds.loggingServers.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The cluster resource name to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "description": "Required. The resource name of the Logging Server to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/loggingServers/[^/]+$", "required": true, "type": "string" } }, "path": "v1/{+name}", "response": { - "$ref": "Cluster" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:getIamPolicy", - "httpMethod": "GET", - "id": "vmwareengine.projects.locations.privateClouds.clusters.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "location": "query", - "type": "integer" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:getIamPolicy", - "response": { - "$ref": "Policy" + "$ref": "LoggingServer" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists `Cluster` resources in a given private cloud.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", + "description": "Lists logging servers configured for a given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers", "httpMethod": "GET", - "id": "vmwareengine.projects.locations.privateClouds.clusters.list", + "id": "vmwareengine.projects.locations.privateClouds.loggingServers.list", "parameterOrder": [ "parent" ], "parameters": { "filter": { - "description": " To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-cluster\") (nodeCount = \"3\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-cluster-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-cluster-2\") ```", + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of logging servers, you can exclude the ones named `example-server` by specifying `name != \"example-server\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-server\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-server-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-server-2\") ```", "location": "query", "type": "string" }, @@ -1094,68 +2385,63 @@ "type": "string" }, "pageSize": { - "description": "The maximum number of clusters to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "description": "The maximum number of logging servers to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "A page token, received from a previous `ListClusters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListClusters` must match the call that provided the page token.", + "description": "A page token, received from a previous `ListLoggingServersRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListLoggingServersRequest` must match the call that provided the page token.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of the private cloud to query for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "description": "Required. The resource name of the private cloud to be queried for logging servers. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+parent}/clusters", + "path": "v1/{+parent}/loggingServers", "response": { - "$ref": "ListClustersResponse" + "$ref": "ListLoggingServersResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Modifies a `Cluster` resource. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + "description": "Updates the parameters of a single logging server. Only fields specified in `update_mask` are applied.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers/{loggingServersId}", "httpMethod": "PATCH", - "id": "vmwareengine.projects.locations.privateClouds.clusters.patch", + "id": "vmwareengine.projects.locations.privateClouds.loggingServers.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Output only. The resource name of this cluster. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "description": "Output only. The resource name of this logging server. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/loggingServers/[^/]+$", "required": true, "type": "string" }, "requestId": { - "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the `Cluster` resource by the update. The fields specified in the `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "description": "Required. Field mask is used to specify the fields to be overwritten in the `LoggingServer` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" - }, - "validateOnly": { - "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", - "location": "query", - "type": "boolean" } }, "path": "v1/{+name}", "request": { - "$ref": "Cluster" + "$ref": "LoggingServer" }, "response": { "$ref": "Operation" @@ -1163,97 +2449,41 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:setIamPolicy", - "httpMethod": "POST", - "id": "vmwareengine.projects.locations.privateClouds.clusters.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:testIamPermissions", - "httpMethod": "POST", - "id": "vmwareengine.projects.locations.privateClouds.clusters.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } }, - "hcxActivationKeys": { + "managementDnsZoneBindings": { "methods": { "create": { - "description": "Creates a new HCX activation key in a given private cloud.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + "description": "Creates a new `ManagementDnsZoneBinding` resource in a private cloud. This RPC creates the DNS binding and the resource that represents the DNS binding of the consumer VPC network to the management DNS zone. A management DNS zone is the Cloud DNS cross-project binding zone that VMware Engine creates for each private cloud. It contains FQDNs and corresponding IP addresses for the private cloud's ESXi hosts and management VM appliances like vCenter and NSX Manager.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings", "httpMethod": "POST", - "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create", + "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.create", "parameterOrder": [ "parent" ], "parameters": { - "hcxActivationKeyId": { - "description": "Required. The user-provided identifier of the `HcxActivationKey` to be created. This identifier must be unique among `HcxActivationKey` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "managementDnsZoneBindingId": { + "description": "Required. The user-provided identifier of the `ManagementDnsZoneBinding` resource to be created. This identifier must be unique among `ManagementDnsZoneBinding` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of the private cloud to create the key for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", + "description": "Required. The resource name of the private cloud to create a new management DNS zone binding for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", "required": true, "type": "string" }, "requestId": { - "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" } }, - "path": "v1/{+parent}/hcxActivationKeys", + "path": "v1/{+parent}/managementDnsZoneBindings", "request": { - "$ref": "HcxActivationKey" + "$ref": "ManagementDnsZoneBinding" }, "response": { "$ref": "Operation" @@ -1262,149 +2492,169 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "get": { - "description": "Retrieves a `HcxActivationKey` resource by its resource name.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}", - "httpMethod": "GET", - "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get", + "delete": { + "description": "Deletes a `ManagementDnsZoneBinding` resource. When a management DNS zone binding is deleted, the corresponding consumer VPC network is no longer bound to the management DNS zone.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}", + "httpMethod": "DELETE", + "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The resource name of the HCX activation key to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`", + "description": "Required. The resource name of the management DNS zone binding to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" } }, "path": "v1/{+name}", "response": { - "$ref": "HcxActivationKey" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:getIamPolicy", + "get": { + "description": "Retrieves a 'ManagementDnsZoneBinding' resource by its resource name.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}", "httpMethod": "GET", - "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.getIamPolicy", + "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.get", "parameterOrder": [ - "resource" + "name" ], "parameters": { - "options.requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "location": "query", - "type": "integer" - }, - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "name": { + "description": "Required. The resource name of the management DNS zone binding to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+resource}:getIamPolicy", + "path": "v1/{+name}", "response": { - "$ref": "Policy" + "$ref": "ManagementDnsZoneBinding" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists `HcxActivationKey` resources in a given private cloud.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + "description": "Lists Consumer VPCs bound to Management DNS Zone of a given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings", "httpMethod": "GET", - "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list", + "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.list", "parameterOrder": [ "parent" ], "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of Management DNS Zone Bindings, you can exclude the ones named `example-management-dns-zone-binding` by specifying `name != \"example-management-dns-zone-binding\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-management-dns-zone-binding\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-management-dns-zone-binding-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-management-dns-zone-binding-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, "pageSize": { - "description": "The maximum number of HCX activation keys to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "description": "The maximum number of management DNS zone bindings to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "A page token, received from a previous `ListHcxActivationKeys` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListHcxActivationKeys` must match the call that provided the page token.", + "description": "A page token, received from a previous `ListManagementDnsZoneBindings` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListManagementDnsZoneBindings` must match the call that provided the page token.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of the private cloud to be queried for HCX activation keys. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", + "description": "Required. The resource name of the private cloud to be queried for management DNS zone bindings. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+parent}/hcxActivationKeys", + "path": "v1/{+parent}/managementDnsZoneBindings", "response": { - "$ref": "ListHcxActivationKeysResponse" + "$ref": "ListManagementDnsZoneBindingsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:setIamPolicy", - "httpMethod": "POST", - "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.setIamPolicy", + "patch": { + "description": "Updates a `ManagementDnsZoneBinding` resource. Only fields specified in `update_mask` are applied.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.patch", "parameterOrder": [ - "resource" + "name" ], "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "name": { + "description": "Output only. The resource name of this binding. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `ManagementDnsZoneBinding` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } }, - "path": "v1/{+resource}:setIamPolicy", + "path": "v1/{+name}", "request": { - "$ref": "SetIamPolicyRequest" + "$ref": "ManagementDnsZoneBinding" }, "response": { - "$ref": "Policy" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:testIamPermissions", + "repair": { + "description": "Retries to create a `ManagementDnsZoneBinding` resource that is in failed state.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}:repair", "httpMethod": "POST", - "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.testIamPermissions", + "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.repair", "parameterOrder": [ - "resource" + "name" ], "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "name": { + "description": "Required. The resource name of the management DNS zone binding to repair. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", "required": true, "type": "string" } }, - "path": "v1/{+resource}:testIamPermissions", + "path": "v1/{+name}:repair", "request": { - "$ref": "TestIamPermissionsRequest" + "$ref": "RepairManagementDnsZoneBindingRequest" }, "response": { - "$ref": "TestIamPermissionsResponse" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -1929,7 +3179,7 @@ } } }, - "revision": "20230922", + "revision": "20231025", "rootUrl": "https://vmwareengine.googleapis.com/", "schemas": { "AuditConfig": { @@ -1995,16 +3245,280 @@ }, "type": "array" }, - "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "Cluster": { + "description": "A cluster in a private cloud.", + "id": "Cluster", + "properties": { + "createTime": { + "description": "Output only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "management": { + "description": "Output only. True if the cluster is a management cluster; false otherwise. There can only be one management cluster in a private cloud and it has to be the first one.", + "readOnly": true, + "type": "boolean" + }, + "name": { + "description": "Output only. The resource name of this cluster. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "readOnly": true, + "type": "string" + }, + "nodeTypeConfigs": { + "additionalProperties": { + "$ref": "NodeTypeConfig" + }, + "description": "Required. The map of cluster node types in this cluster, where the key is canonical identifier of the node type (corresponds to the `NodeType`).", + "type": "object" + }, + "state": { + "description": "Output only. State of the resource.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "UPDATING", + "DELETING", + "REPAIRING" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "The Cluster is operational and can be used by the user.", + "The Cluster is being deployed.", + "Adding or removing of a node to the cluster, any other cluster specific updates.", + "The Cluster is being deleted.", + "The Cluster is undergoing maintenance, for example: a failed node is getting replaced." + ], + "readOnly": true, + "type": "string" + }, + "stretchedClusterConfig": { + "$ref": "StretchedClusterConfig", + "description": "Optional. Configuration of a stretched cluster. Required for clusters that belong to a STRETCHED private cloud." + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Credentials": { + "description": "Credentials for a private cloud.", + "id": "Credentials", + "properties": { + "password": { + "description": "Initial password.", + "type": "string" + }, + "username": { + "description": "Initial username.", + "type": "string" + } + }, + "type": "object" + }, + "DnsBindPermission": { + "description": "DnsBindPermission resource that contains the accounts having the consumer DNS bind permission on the corresponding intranet VPC of the consumer project.", + "id": "DnsBindPermission", + "properties": { + "name": { + "description": "Required. Output only. The name of the resource which stores the users/service accounts having the permission to bind to the corresponding intranet VPC of the consumer project. DnsBindPermission is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/dnsBindPermission`", + "readOnly": true, + "type": "string" + }, + "principals": { + "description": "Output only. Users/Service accounts which have access for binding on the intranet VPC project corresponding to the consumer project.", + "items": { + "$ref": "Principal" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "DnsForwarding": { + "description": "DNS forwarding config. This config defines a list of domain to name server mappings, and is attached to the private cloud for custom domain resolution.", + "id": "DnsForwarding", + "properties": { + "createTime": { + "description": "Output only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "forwardingRules": { + "description": "Required. List of domain mappings to configure", + "items": { + "$ref": "ForwardingRule" + }, + "type": "array" + }, + "name": { + "description": "Output only. The resource name of this DNS profile. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "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": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "ExternalAccessRule": { + "description": "External access firewall rules for filtering incoming traffic destined to `ExternalAddress` resources.", + "id": "ExternalAccessRule", + "properties": { + "action": { + "description": "The action that the external access rule performs.", + "enum": [ + "ACTION_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "enumDescriptions": [ + "Defaults to allow.", + "Allows connections that match the other specified components.", + "Blocks connections that match the other specified components." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "User-provided description for this external access rule.", + "type": "string" + }, + "destinationIpRanges": { + "description": "If destination ranges are specified, the external access rule applies only to the traffic that has a destination IP address in these ranges. The specified IP addresses must have reserved external IP addresses in the scope of the parent network policy. To match all external IP addresses in the scope of the parent network policy, specify `0.0.0.0/0`. To match a specific external IP address, specify it using the `IpRange.external_address` property.", + "items": { + "$ref": "IpRange" + }, + "type": "array" + }, + "destinationPorts": { + "description": "A list of destination ports to which the external access rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. For example: `[\"22\"]`, `[\"80\",\"443\"]`, or `[\"12345-12349\"]`. To match all destination ports, specify `[\"0-65535\"]`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ipProtocol": { + "description": "The IP protocol to which the external access rule applies. This value can be one of the following three protocol strings (not case-sensitive): `tcp`, `udp`, or `icmp`.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of this external access rule. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`", + "readOnly": true, + "type": "string" + }, + "priority": { + "description": "External access rule priority, which determines the external access rule to use when multiple rules apply. If multiple rules have the same priority, their ordering is non-deterministic. If specific ordering is required, assign unique priorities to enforce such ordering. The external access rule priority is an integer from 100 to 4096, both inclusive. Lower integers indicate higher precedence. For example, a rule with priority `100` has higher precedence than a rule with priority `101`.", + "format": "int32", + "type": "integer" + }, + "sourceIpRanges": { + "description": "If source ranges are specified, the external access rule applies only to traffic that has a source IP address in these ranges. These ranges can either be expressed in the CIDR format or as an IP address. As only inbound rules are supported, `ExternalAddress` resources cannot be the source IP addresses of an external access rule. To match all source addresses, specify `0.0.0.0/0`.", + "items": { + "$ref": "IpRange" + }, + "type": "array" + }, + "sourcePorts": { + "description": "A list of source ports to which the external access rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. For example: `[\"22\"]`, `[\"80\",\"443\"]`, or `[\"12345-12349\"]`. To match all source ports, specify `[\"0-65535\"]`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "description": "Output only. The state of the resource.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "UPDATING", + "DELETING" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The rule is ready.", + "The rule is being created.", + "The rule is being updated.", + "The rule is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "Cluster": { - "description": "A cluster in a private cloud.", - "id": "Cluster", + "ExternalAddress": { + "description": "Represents an allocated external IP address and its corresponding internal IP address in a private cloud.", + "id": "ExternalAddress", "properties": { "createTime": { "description": "Output only. Creation time of this resource.", @@ -2012,40 +3526,39 @@ "readOnly": true, "type": "string" }, - "management": { - "description": "Output only. True if the cluster is a management cluster; false otherwise. There can only be one management cluster in a private cloud and it has to be the first one.", + "description": { + "description": "User-provided description for this resource.", + "type": "string" + }, + "externalIp": { + "description": "Output only. The external IP address of a workload VM.", "readOnly": true, - "type": "boolean" + "type": "string" + }, + "internalIp": { + "description": "The internal IP address of a workload VM.", + "type": "string" }, "name": { - "description": "Output only. The resource name of this cluster. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "description": "Output only. The resource name of this external IP address. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`", "readOnly": true, "type": "string" }, - "nodeTypeConfigs": { - "additionalProperties": { - "$ref": "NodeTypeConfig" - }, - "description": "Required. The map of cluster node types in this cluster, where the key is canonical identifier of the node type (corresponds to the `NodeType`).", - "type": "object" - }, "state": { - "description": "Output only. State of the resource.", + "description": "Output only. The state of the resource.", "enum": [ "STATE_UNSPECIFIED", "ACTIVE", "CREATING", "UPDATING", - "DELETING", - "REPAIRING" + "DELETING" ], "enumDescriptions": [ "The default value. This value should never be used.", - "The Cluster is operational and can be used by the user.", - "The Cluster is being deployed.", - "Adding or removing of a node to the cluster, any other cluster specific updates.", - "The Cluster is being deleted.", - "The Cluster is undergoing maintenance, for example: a failed node is getting replaced." + "The address is ready.", + "The address is being created.", + "The address is being updated.", + "The address is being deleted." ], "readOnly": true, "type": "string" @@ -2064,45 +3577,52 @@ }, "type": "object" }, - "Credentials": { - "description": "Credentials for a private cloud.", - "id": "Credentials", + "FetchNetworkPolicyExternalAddressesResponse": { + "description": "Response message for VmwareEngine.FetchNetworkPolicyExternalAddresses", + "id": "FetchNetworkPolicyExternalAddressesResponse", "properties": { - "password": { - "description": "Initial password.", - "type": "string" + "externalAddresses": { + "description": "A list of external IP addresses assigned to VMware workload VMs within the scope of the given network policy.", + "items": { + "$ref": "ExternalAddress" + }, + "type": "array" }, - "username": { - "description": "Initial username.", + "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" }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", - "id": "Empty", - "properties": {}, - "type": "object" - }, - "Expr": { - "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": "Expr", + "ForwardingRule": { + "description": "A forwarding rule is a mapping of a `domain` to `name_servers`. This mapping allows VMware Engine to resolve domains for attached private clouds by forwarding DNS requests for a given domain to the specified nameservers.", + "id": "ForwardingRule", "properties": { - "description": { - "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in Common Expression Language syntax.", + "domain": { + "description": "Required. Domain used to resolve a `name_servers` list.", "type": "string" }, - "location": { - "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", - "type": "string" + "nameServers": { + "description": "Required. List of DNS servers to use for domain resolution", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GrantDnsBindPermissionRequest": { + "description": "Request message for VmwareEngine.GrantDnsBindPermission", + "id": "GrantDnsBindPermissionRequest", + "properties": { + "principal": { + "$ref": "Principal", + "description": "Required. The consumer provided user/service account which needs to be granted permission to bind with the intranet VPC corresponding to the consumer project." }, - "title": { - "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "type": "string" } }, @@ -2187,6 +3707,25 @@ }, "type": "object" }, + "IpRange": { + "description": "An IP range provided in any one of the supported formats.", + "id": "IpRange", + "properties": { + "externalAddress": { + "description": "The name of an `ExternalAddress` resource. The external address must have been reserved in the scope of this external access rule's parent network policy. Provide the external address name in the form of `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`.", + "type": "string" + }, + "ipAddress": { + "description": "A single IP address. For example: `10.0.0.5`.", + "type": "string" + }, + "ipAddressRange": { + "description": "An IP address range in the CIDR format. For example: `10.0.0.0/24`.", + "type": "string" + } + }, + "type": "object" + }, "ListClustersResponse": { "description": "Response message for VmwareEngine.ListClusters", "id": "ListClustersResponse", @@ -2212,6 +3751,56 @@ }, "type": "object" }, + "ListExternalAccessRulesResponse": { + "description": "Response message for VmwareEngine.ListExternalAccessRules", + "id": "ListExternalAccessRulesResponse", + "properties": { + "externalAccessRules": { + "description": "A list of external access firewall rules.", + "items": { + "$ref": "ExternalAccessRule" + }, + "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" + }, + "unreachable": { + "description": "Locations that could not be reached when making an aggregated query using wildcards.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListExternalAddressesResponse": { + "description": "Response message for VmwareEngine.ListExternalAddresses", + "id": "ListExternalAddressesResponse", + "properties": { + "externalAddresses": { + "description": "A list of external IP addresses.", + "items": { + "$ref": "ExternalAddress" + }, + "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" + }, + "unreachable": { + "description": "Locations that could not be reached when making an aggregated query using wildcards.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListHcxActivationKeysResponse": { "description": "Response message for VmwareEngine.ListHcxActivationKeys", "id": "ListHcxActivationKeysResponse", @@ -2255,6 +3844,81 @@ }, "type": "object" }, + "ListLoggingServersResponse": { + "description": "Response message for VmwareEngine.ListLoggingServers", + "id": "ListLoggingServersResponse", + "properties": { + "loggingServers": { + "description": "A list of Logging Servers.", + "items": { + "$ref": "LoggingServer" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be send as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached when making an aggregated query using wildcards.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListManagementDnsZoneBindingsResponse": { + "description": "Response message for VmwareEngine.ListManagementDnsZoneBindings", + "id": "ListManagementDnsZoneBindingsResponse", + "properties": { + "managementDnsZoneBindings": { + "description": "A list of management DNS zone bindings.", + "items": { + "$ref": "ManagementDnsZoneBinding" + }, + "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" + }, + "unreachable": { + "description": "Locations that could not be reached when making an aggregated query using wildcards.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListNetworkPeeringsResponse": { + "description": "Response message for VmwareEngine.ListNetworkPeerings", + "id": "ListNetworkPeeringsResponse", + "properties": { + "networkPeerings": { + "description": "A list of network peerings.", + "items": { + "$ref": "NetworkPeering" + }, + "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" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListNetworkPoliciesResponse": { "description": "Response message for VmwareEngine.ListNetworkPolicies", "id": "ListNetworkPoliciesResponse", @@ -2305,6 +3969,24 @@ }, "type": "object" }, + "ListNodesResponse": { + "description": "Response message for VmwareEngine.ListNodes", + "id": "ListNodesResponse", + "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" + }, + "nodes": { + "description": "The nodes.", + "items": { + "$ref": "Node" + }, + "type": "array" + } + }, + "type": "object" + }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "ListOperationsResponse", @@ -2323,6 +4005,24 @@ }, "type": "object" }, + "ListPeeringRoutesResponse": { + "description": "Response message for VmwareEngine.ListPeeringRoutes", + "id": "ListPeeringRoutesResponse", + "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" + }, + "peeringRoutes": { + "description": "A list of peering routes.", + "items": { + "$ref": "PeeringRoute" + }, + "type": "array" + } + }, + "type": "object" + }, "ListPrivateCloudsResponse": { "description": "Response message for VmwareEngine.ListPrivateClouds", "id": "ListPrivateCloudsResponse", @@ -2449,27 +4149,116 @@ "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", "type": "string" }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", - "type": "object" + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "LocationMetadata": { + "description": "VmwareEngine specific metadata for the given google.cloud.location.Location. It is returned as a content of the `google.cloud.location.Location.metadata` field.", + "id": "LocationMetadata", + "properties": { + "capabilities": { + "description": "Output only. Capabilities of this location.", + "items": { + "enum": [ + "CAPABILITY_UNSPECIFIED", + "STRETCHED_CLUSTERS" + ], + "enumDescriptions": [ + "The default value. This value is used if the capability is omitted or unknown.", + "Stretch clusters are supported in this location." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "LoggingServer": { + "description": "Logging server to receive vCenter or ESXi logs.", + "id": "LoggingServer", + "properties": { + "createTime": { + "description": "Output only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "hostname": { + "description": "Required. Fully-qualified domain name (FQDN) or IP Address of the logging server.", + "type": "string" }, - "locationId": { - "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "name": { + "description": "Output only. The resource name of this logging server. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`", + "readOnly": true, "type": "string" }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata. For example the available capacity at the given location.", - "type": "object" + "port": { + "description": "Required. Port number at which the logging server receives logs.", + "format": "int32", + "type": "integer" }, - "name": { - "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "protocol": { + "description": "Required. Protocol used by vCenter to send logs to a logging server.", + "enum": [ + "PROTOCOL_UNSPECIFIED", + "UDP", + "TCP" + ], + "enumDescriptions": [ + "Unspecified communications protocol. This is the default value.", + "UDP", + "TCP" + ], + "type": "string" + }, + "sourceType": { + "description": "Required. The type of component that produces logs that will be forwarded to this logging server.", + "enum": [ + "SOURCE_TYPE_UNSPECIFIED", + "ESXI", + "VCSA" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "Logs produced by ESXI hosts", + "Logs produced by vCenter server" + ], + "type": "string" + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, @@ -2489,6 +4278,72 @@ }, "description": "Required. The map of cluster node types in this cluster, where the key is canonical identifier of the node type (corresponds to the `NodeType`).", "type": "object" + }, + "stretchedClusterConfig": { + "$ref": "StretchedClusterConfig", + "description": "Optional. Configuration of a stretched cluster. Required for STRETCHED private clouds." + } + }, + "type": "object" + }, + "ManagementDnsZoneBinding": { + "description": "Represents a binding between a network and the management DNS zone. A management DNS zone is the Cloud DNS cross-project binding zone that VMware Engine creates for each private cloud. It contains FQDNs and corresponding IP addresses for the private cloud's ESXi hosts and management VM appliances like vCenter and NSX Manager.", + "id": "ManagementDnsZoneBinding", + "properties": { + "createTime": { + "description": "Output only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "User-provided description for this resource.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of this binding. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The state of the resource.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "UPDATING", + "DELETING", + "FAILED" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "The binding is ready.", + "The binding is being created.", + "The binding is being updated.", + "The binding is being deleted.", + "The binding has failed." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vmwareEngineNetwork": { + "description": "Network to bind is a VMware Engine network. Specify the name in the following form for VMware engine network: `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. `{project}` can either be a project number or a project ID.", + "type": "string" + }, + "vpcNetwork": { + "description": "Network to bind is a standard consumer VPC. Specify the name in the following form for consumer VPC network: `projects/{project}/global/networks/{network_id}`. `{project}` can either be a project number or a project ID.", + "type": "string" } }, "type": "object" @@ -2497,6 +4352,11 @@ "description": "Network configuration in the consumer project with which the peering has to be done.", "id": "NetworkConfig", "properties": { + "dnsServerIp": { + "description": "Output only. DNS Server IP of the Private Cloud. All DNS queries can be forwarded to this address for name resolution of Private Cloud's management entities like vCenter, NSX-T Manager and ESXi hosts.", + "readOnly": true, + "type": "string" + }, "managementCidr": { "description": "Required. Management CIDR used by VMware management appliances.", "type": "string" @@ -2519,6 +4379,118 @@ }, "type": "object" }, + "NetworkPeering": { + "description": "Details of a network peering.", + "id": "NetworkPeering", + "properties": { + "createTime": { + "description": "Output only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. User-provided description for this network peering.", + "type": "string" + }, + "exchangeSubnetRoutes": { + "description": "Optional. True if full mesh connectivity is created and managed automatically between peered networks; false otherwise. Currently this field is always true because Google Compute Engine automatically creates and manages subnetwork routes between two VPC networks when peering state is 'ACTIVE'.", + "type": "boolean" + }, + "exportCustomRoutes": { + "description": "Optional. True if custom routes are exported to the peered network; false otherwise. The default value is true.", + "type": "boolean" + }, + "exportCustomRoutesWithPublicIp": { + "description": "Optional. True if all subnet routes with a public IP address range are exported; false otherwise. The default value is true. IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.", + "type": "boolean" + }, + "importCustomRoutes": { + "description": "Optional. True if custom routes are imported from the peered network; false otherwise. The default value is true.", + "type": "boolean" + }, + "importCustomRoutesWithPublicIp": { + "description": "Optional. True if all subnet routes with public IP address range are imported; false otherwise. The default value is true. IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported to peers and are not controlled by this field.", + "type": "boolean" + }, + "name": { + "description": "Output only. The resource name of the network peering. Resource names are scheme-less URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", + "readOnly": true, + "type": "string" + }, + "peerMtu": { + "description": "Optional. Maximum transmission unit (MTU) in bytes. The default value is `1500`. If a value of `0` is provided for this field, VMware Engine uses the default value instead.", + "format": "int32", + "type": "integer" + }, + "peerNetwork": { + "description": "Required. The relative resource name of the network to peer with a standard VMware Engine network. The provided network can be a consumer VPC network or another standard VMware Engine network. If the `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form: `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. Otherwise specify the name in the form: `projects/{project}/global/networks/{network_id}`, where `{project}` can either be a project number or a project ID.", + "type": "string" + }, + "peerNetworkType": { + "description": "Required. The type of the network to peer with the VMware Engine network.", + "enum": [ + "PEER_NETWORK_TYPE_UNSPECIFIED", + "STANDARD", + "VMWARE_ENGINE_NETWORK", + "PRIVATE_SERVICES_ACCESS", + "NETAPP_CLOUD_VOLUMES", + "THIRD_PARTY_SERVICE", + "DELL_POWERSCALE" + ], + "enumDescriptions": [ + "Unspecified", + "Peering connection used for connecting to another VPC network established by the same user. For example, a peering connection to another VPC network in the same project or to an on-premises network.", + "Peering connection used for connecting to another VMware Engine network.", + "Peering connection used for establishing [private services access](https://cloud.google.com/vpc/docs/private-services-access).", + "Peering connection used for connecting to NetApp Cloud Volumes.", + "Peering connection used for connecting to third-party services. Most third-party services require manual setup of reverse peering on the VPC network associated with the third-party service.", + "Peering connection used for connecting to Dell PowerScale Filers" + ], + "type": "string" + }, + "state": { + "description": "Output only. State of the network peering. This field has a value of 'ACTIVE' when there's a matching configuration in the peer network. New values may be added to this enum when appropriate.", + "enum": [ + "STATE_UNSPECIFIED", + "INACTIVE", + "ACTIVE", + "CREATING", + "DELETING" + ], + "enumDescriptions": [ + "Unspecified network peering state. This is the default value.", + "The peering is not active.", + "The peering is active.", + "The peering is being created.", + "The peering is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. Output Only. Details about the current state of the network peering.", + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vmwareEngineNetwork": { + "description": "Required. The relative resource name of the VMware Engine network. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}` can either be a project number or a project ID.", + "type": "string" + } + }, + "type": "object" + }, "NetworkPolicy": { "description": "Represents a network policy resource. Network policies are regional resources. You can use a network policy to enable or disable internet access and external IP access. Network policies are associated with a VMware Engine network, which might span across regions. For a given region, a network policy applies to all private clouds in the VMware Engine network associated with the policy.", "id": "NetworkPolicy", @@ -2601,6 +4573,63 @@ }, "type": "object" }, + "Node": { + "description": "Node in a cluster.", + "id": "Node", + "properties": { + "customCoreCount": { + "description": "Output only. Customized number of cores", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "fqdn": { + "description": "Output only. Fully qualified domain name of the node.", + "readOnly": true, + "type": "string" + }, + "internalIp": { + "description": "Output only. Internal IP address of the node.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The resource name of this node. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node", + "readOnly": true, + "type": "string" + }, + "nodeTypeId": { + "description": "Output only. The canonical identifier of the node type (corresponds to the `NodeType`). For example: standard-72.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The state of the appliance.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "FAILED", + "UPGRADING" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "Node is operational and can be used by the user.", + "Node is being provisioned.", + "Node is in a failed state.", + "Node is undergoing maintenance, e.g.: during private cloud upgrade." + ], + "readOnly": true, + "type": "string" + }, + "version": { + "description": "Output only. The version number of the VMware ESXi management component in this cluster.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "NodeType": { "description": "Describes node type.", "id": "NodeType", @@ -2614,6 +4643,22 @@ "readOnly": true, "type": "array" }, + "capabilities": { + "description": "Output only. Capabilities of this node type.", + "items": { + "enum": [ + "CAPABILITY_UNSPECIFIED", + "STRETCHED_CLUSTERS" + ], + "enumDescriptions": [ + "The default value. This value is used if the capability is omitted or unknown.", + "This node type supports stretch clusters." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "diskSizeGb": { "description": "Output only. The amount of storage available, defined in GB.", "format": "int32", @@ -2877,6 +4922,21 @@ }, "type": "object" }, + "Principal": { + "description": "Users/Service accounts which have access for DNS binding on the intranet VPC corresponding to the consumer project.", + "id": "Principal", + "properties": { + "serviceAccount": { + "description": "The service account which needs to be granted the permission.", + "type": "string" + }, + "user": { + "description": "The user who needs to be granted permission.", + "type": "string" + } + }, + "type": "object" + }, "PrivateCloud": { "description": "Represents a private cloud resource. Private clouds of type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are regional.", "id": "PrivateCloud", @@ -2953,11 +5013,13 @@ "description": "Optional. Type of the private cloud. Defaults to STANDARD.", "enum": [ "STANDARD", - "TIME_LIMITED" + "TIME_LIMITED", + "STRETCHED" ], "enumDescriptions": [ "Standard private is a zonal resource, with 3+ nodes. Default type.", - "Time limited private cloud is a zonal resource, can have only 1 node and has limited life span. Will be deleted after defined period of time, can be converted into standard private cloud by expanding it up to 3 or more nodes." + "Time limited private cloud is a zonal resource, can have only 1 node and has limited life span. Will be deleted after defined period of time, can be converted into standard private cloud by expanding it up to 3 or more nodes.", + "Stretched private cloud is a regional resource with redundancy, with a minimum of 6 nodes, nodes count has to be even." ], "type": "string" }, @@ -3101,6 +5163,17 @@ }, "type": "object" }, + "RepairManagementDnsZoneBindingRequest": { + "description": "Request message for VmwareEngine.RepairManagementDnsZoneBindings", + "id": "RepairManagementDnsZoneBindingRequest", + "properties": { + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + } + }, + "type": "object" + }, "ResetNsxCredentialsRequest": { "description": "Request message for VmwareEngine.ResetNsxCredentials", "id": "ResetNsxCredentialsRequest", @@ -3116,6 +5189,25 @@ "description": "Request message for VmwareEngine.ResetVcenterCredentials", "id": "ResetVcenterCredentialsRequest", "properties": { + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "username": { + "description": "Optional. The username of the user to be to reset the credentials. The default value of this field is CloudOwner@gve.local. The provided value should be one of the following: solution-user-01@gve.local, solution-user-02@gve.local, solution-user-03@gve.local, solution-user-04@gve.local, solution-user-05@gve.local, zertoadmin@gve.local.", + "type": "string" + } + }, + "type": "object" + }, + "RevokeDnsBindPermissionRequest": { + "description": "Request message for VmwareEngine.RevokeDnsBindPermission", + "id": "RevokeDnsBindPermissionRequest", + "properties": { + "principal": { + "$ref": "Principal", + "description": "Required. The consumer provided user/service account which needs to be granted permission to bind with the intranet VPC corresponding to the consumer project." + }, "requestId": { "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", "type": "string" @@ -3166,6 +5258,21 @@ }, "type": "object" }, + "StretchedClusterConfig": { + "description": "Configuration of a stretched cluster.", + "id": "StretchedClusterConfig", + "properties": { + "preferredLocation": { + "description": "Required. Zone that will remain operational when connection between the two zones is lost. Specify the resource name of a zone that belongs to the region of the private cloud. For example: `projects/{project}/locations/europe-west3-a` where `{project}` can either be a project number or a project ID.", + "type": "string" + }, + "secondaryLocation": { + "description": "Required. Additional zone for a higher level of availability and load balancing. Specify the resource name of a zone that belongs to the region of the private cloud. For example: `projects/{project}/locations/europe-west3-b` where `{project}` can either be a project number or a project ID.", + "type": "string" + } + }, + "type": "object" + }, "Subnet": { "description": "Subnet in a private cloud. Either `management` subnets (such as vMotion) that are read-only, or `userDefined`, which can also be updated.", "id": "Subnet", @@ -3210,6 +5317,12 @@ "description": "Output only. The type of the subnet. For example \"management\" or \"userDefined\".", "readOnly": true, "type": "string" + }, + "vlanId": { + "description": "Output only. VLAN ID of the VLAN on which the subnet is configured", + "format": "int32", + "readOnly": true, + "type": "integer" } }, "type": "object" @@ -3333,11 +5446,13 @@ "description": "Required. VMware Engine network type.", "enum": [ "TYPE_UNSPECIFIED", - "LEGACY" + "LEGACY", + "STANDARD" ], "enumDescriptions": [ "The default value. This value should never be used.", - "Network type used by private clouds created in projects without a network of type `STANDARD`. This network type is no longer used for new VMware Engine private cloud deployments." + "Network type used by private clouds created in projects without a network of type `STANDARD`. This network type is no longer used for new VMware Engine private cloud deployments.", + "Standard network type used for private cloud connectivity." ], "type": "string" }, diff --git a/vmwareengine/v1/vmwareengine-gen.go b/vmwareengine/v1/vmwareengine-gen.go index 0aab204fa3b..bf3d3cd47b7 100644 --- a/vmwareengine/v1/vmwareengine-gen.go +++ b/vmwareengine/v1/vmwareengine-gen.go @@ -165,6 +165,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.Global = NewProjectsLocationsGlobalService(s) rs.NetworkPolicies = NewProjectsLocationsNetworkPoliciesService(s) rs.NodeTypes = NewProjectsLocationsNodeTypesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) @@ -177,6 +178,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + Global *ProjectsLocationsGlobalService + NetworkPolicies *ProjectsLocationsNetworkPoliciesService NodeTypes *ProjectsLocationsNodeTypesService @@ -190,13 +193,70 @@ type ProjectsLocationsService struct { VmwareEngineNetworks *ProjectsLocationsVmwareEngineNetworksService } +func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService { + rs := &ProjectsLocationsGlobalService{s: s} + rs.DnsBindPermission = NewProjectsLocationsGlobalDnsBindPermissionService(s) + rs.NetworkPeerings = NewProjectsLocationsGlobalNetworkPeeringsService(s) + return rs +} + +type ProjectsLocationsGlobalService struct { + s *Service + + DnsBindPermission *ProjectsLocationsGlobalDnsBindPermissionService + + NetworkPeerings *ProjectsLocationsGlobalNetworkPeeringsService +} + +func NewProjectsLocationsGlobalDnsBindPermissionService(s *Service) *ProjectsLocationsGlobalDnsBindPermissionService { + rs := &ProjectsLocationsGlobalDnsBindPermissionService{s: s} + return rs +} + +type ProjectsLocationsGlobalDnsBindPermissionService struct { + s *Service +} + +func NewProjectsLocationsGlobalNetworkPeeringsService(s *Service) *ProjectsLocationsGlobalNetworkPeeringsService { + rs := &ProjectsLocationsGlobalNetworkPeeringsService{s: s} + rs.PeeringRoutes = NewProjectsLocationsGlobalNetworkPeeringsPeeringRoutesService(s) + return rs +} + +type ProjectsLocationsGlobalNetworkPeeringsService struct { + s *Service + + PeeringRoutes *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesService +} + +func NewProjectsLocationsGlobalNetworkPeeringsPeeringRoutesService(s *Service) *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesService { + rs := &ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesService{s: s} + return rs +} + +type ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesService struct { + s *Service +} + func NewProjectsLocationsNetworkPoliciesService(s *Service) *ProjectsLocationsNetworkPoliciesService { rs := &ProjectsLocationsNetworkPoliciesService{s: s} + rs.ExternalAccessRules = NewProjectsLocationsNetworkPoliciesExternalAccessRulesService(s) return rs } type ProjectsLocationsNetworkPoliciesService struct { s *Service + + ExternalAccessRules *ProjectsLocationsNetworkPoliciesExternalAccessRulesService +} + +func NewProjectsLocationsNetworkPoliciesExternalAccessRulesService(s *Service) *ProjectsLocationsNetworkPoliciesExternalAccessRulesService { + rs := &ProjectsLocationsNetworkPoliciesExternalAccessRulesService{s: s} + return rs +} + +type ProjectsLocationsNetworkPoliciesExternalAccessRulesService struct { + s *Service } func NewProjectsLocationsNodeTypesService(s *Service) *ProjectsLocationsNodeTypesService { @@ -220,7 +280,10 @@ type ProjectsLocationsOperationsService struct { func NewProjectsLocationsPrivateCloudsService(s *Service) *ProjectsLocationsPrivateCloudsService { rs := &ProjectsLocationsPrivateCloudsService{s: s} rs.Clusters = NewProjectsLocationsPrivateCloudsClustersService(s) + rs.ExternalAddresses = NewProjectsLocationsPrivateCloudsExternalAddressesService(s) rs.HcxActivationKeys = NewProjectsLocationsPrivateCloudsHcxActivationKeysService(s) + rs.LoggingServers = NewProjectsLocationsPrivateCloudsLoggingServersService(s) + rs.ManagementDnsZoneBindings = NewProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService(s) rs.Subnets = NewProjectsLocationsPrivateCloudsSubnetsService(s) return rs } @@ -230,18 +293,45 @@ type ProjectsLocationsPrivateCloudsService struct { Clusters *ProjectsLocationsPrivateCloudsClustersService + ExternalAddresses *ProjectsLocationsPrivateCloudsExternalAddressesService + HcxActivationKeys *ProjectsLocationsPrivateCloudsHcxActivationKeysService + LoggingServers *ProjectsLocationsPrivateCloudsLoggingServersService + + ManagementDnsZoneBindings *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService + Subnets *ProjectsLocationsPrivateCloudsSubnetsService } func NewProjectsLocationsPrivateCloudsClustersService(s *Service) *ProjectsLocationsPrivateCloudsClustersService { rs := &ProjectsLocationsPrivateCloudsClustersService{s: s} + rs.Nodes = NewProjectsLocationsPrivateCloudsClustersNodesService(s) return rs } type ProjectsLocationsPrivateCloudsClustersService struct { s *Service + + Nodes *ProjectsLocationsPrivateCloudsClustersNodesService +} + +func NewProjectsLocationsPrivateCloudsClustersNodesService(s *Service) *ProjectsLocationsPrivateCloudsClustersNodesService { + rs := &ProjectsLocationsPrivateCloudsClustersNodesService{s: s} + return rs +} + +type ProjectsLocationsPrivateCloudsClustersNodesService struct { + s *Service +} + +func NewProjectsLocationsPrivateCloudsExternalAddressesService(s *Service) *ProjectsLocationsPrivateCloudsExternalAddressesService { + rs := &ProjectsLocationsPrivateCloudsExternalAddressesService{s: s} + return rs +} + +type ProjectsLocationsPrivateCloudsExternalAddressesService struct { + s *Service } func NewProjectsLocationsPrivateCloudsHcxActivationKeysService(s *Service) *ProjectsLocationsPrivateCloudsHcxActivationKeysService { @@ -253,6 +343,24 @@ type ProjectsLocationsPrivateCloudsHcxActivationKeysService struct { s *Service } +func NewProjectsLocationsPrivateCloudsLoggingServersService(s *Service) *ProjectsLocationsPrivateCloudsLoggingServersService { + rs := &ProjectsLocationsPrivateCloudsLoggingServersService{s: s} + return rs +} + +type ProjectsLocationsPrivateCloudsLoggingServersService struct { + s *Service +} + +func NewProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService(s *Service) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService { + rs := &ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService{s: s} + return rs +} + +type ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService struct { + s *Service +} + func NewProjectsLocationsPrivateCloudsSubnetsService(s *Service) *ProjectsLocationsPrivateCloudsSubnetsService { rs := &ProjectsLocationsPrivateCloudsSubnetsService{s: s} return rs @@ -503,6 +611,11 @@ type Cluster struct { // failed node is getting replaced. State string `json:"state,omitempty"` + // StretchedClusterConfig: Optional. Configuration of a stretched + // cluster. Required for clusters that belong to a STRETCHED private + // cloud. + StretchedClusterConfig *StretchedClusterConfig `json:"stretchedClusterConfig,omitempty"` + // Uid: Output only. System-generated unique identifier for the // resource. Uid string `json:"uid,omitempty"` @@ -572,6 +685,98 @@ func (s *Credentials) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DnsBindPermission: DnsBindPermission resource that contains the +// accounts having the consumer DNS bind permission on the corresponding +// intranet VPC of the consumer project. +type DnsBindPermission struct { + // Name: Required. Output only. The name of the resource which stores + // the users/service accounts having the permission to bind to the + // corresponding intranet VPC of the consumer project. DnsBindPermission + // is a global resource. Resource names are schemeless URIs that follow + // the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/global/dnsBindPermission` + Name string `json:"name,omitempty"` + + // Principals: Output only. Users/Service accounts which have access for + // binding on the intranet VPC project corresponding to the consumer + // project. + Principals []*Principal `json:"principals,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // 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 *DnsBindPermission) MarshalJSON() ([]byte, error) { + type NoMethod DnsBindPermission + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DnsForwarding: DNS forwarding config. This config defines a list of +// domain to name server mappings, and is attached to the private cloud +// for custom domain resolution. +type DnsForwarding struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` + + // ForwardingRules: Required. List of domain mappings to configure + ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"` + + // Name: Output only. The resource name of this DNS profile. Resource + // names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dn + // sForwarding` + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. Last update time of this resource. + 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 *DnsForwarding) MarshalJSON() ([]byte, error) { + type NoMethod DnsForwarding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -643,27 +848,102 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Hcx: Details about a HCX Cloud Manager appliance. -type Hcx struct { - // Fqdn: Fully qualified domain name of the appliance. - Fqdn string `json:"fqdn,omitempty"` +// ExternalAccessRule: External access firewall rules for filtering +// incoming traffic destined to `ExternalAddress` resources. +type ExternalAccessRule struct { + // Action: The action that the external access rule performs. + // + // Possible values: + // "ACTION_UNSPECIFIED" - Defaults to allow. + // "ALLOW" - Allows connections that match the other specified + // components. + // "DENY" - Blocks connections that match the other specified + // components. + Action string `json:"action,omitempty"` - // InternalIp: Internal IP address of the appliance. - InternalIp string `json:"internalIp,omitempty"` + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` - // State: Output only. The state of the appliance. + // Description: User-provided description for this external access rule. + Description string `json:"description,omitempty"` + + // DestinationIpRanges: If destination ranges are specified, the + // external access rule applies only to the traffic that has a + // destination IP address in these ranges. The specified IP addresses + // must have reserved external IP addresses in the scope of the parent + // network policy. To match all external IP addresses in the scope of + // the parent network policy, specify `0.0.0.0/0`. To match a specific + // external IP address, specify it using the `IpRange.external_address` + // property. + DestinationIpRanges []*IpRange `json:"destinationIpRanges,omitempty"` + + // DestinationPorts: A list of destination ports to which the external + // access rule applies. This field is only applicable for the UDP or TCP + // protocol. Each entry must be either an integer or a range. For + // example: `["22"]`, `["80","443"]`, or `["12345-12349"]`. To match all + // destination ports, specify `["0-65535"]`. + DestinationPorts []string `json:"destinationPorts,omitempty"` + + // IpProtocol: The IP protocol to which the external access rule + // applies. This value can be one of the following three protocol + // strings (not case-sensitive): `tcp`, `udp`, or `icmp`. + IpProtocol string `json:"ipProtocol,omitempty"` + + // Name: Output only. The resource name of this external access rule. + // Resource names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1/networkPolicies/my-policy/e + // xternalAccessRules/my-rule` + Name string `json:"name,omitempty"` + + // Priority: External access rule priority, which determines the + // external access rule to use when multiple rules apply. If multiple + // rules have the same priority, their ordering is non-deterministic. If + // specific ordering is required, assign unique priorities to enforce + // such ordering. The external access rule priority is an integer from + // 100 to 4096, both inclusive. Lower integers indicate higher + // precedence. For example, a rule with priority `100` has higher + // precedence than a rule with priority `101`. + Priority int64 `json:"priority,omitempty"` + + // SourceIpRanges: If source ranges are specified, the external access + // rule applies only to traffic that has a source IP address in these + // ranges. These ranges can either be expressed in the CIDR format or as + // an IP address. As only inbound rules are supported, `ExternalAddress` + // resources cannot be the source IP addresses of an external access + // rule. To match all source addresses, specify `0.0.0.0/0`. + SourceIpRanges []*IpRange `json:"sourceIpRanges,omitempty"` + + // SourcePorts: A list of source ports to which the external access rule + // applies. This field is only applicable for the UDP or TCP protocol. + // Each entry must be either an integer or a range. For example: + // `["22"]`, `["80","443"]`, or `["12345-12349"]`. To match all source + // ports, specify `["0-65535"]`. + SourcePorts []string `json:"sourcePorts,omitempty"` + + // State: Output only. The state of the resource. // // Possible values: - // "STATE_UNSPECIFIED" - Unspecified appliance state. This is the - // default value. - // "ACTIVE" - The appliance is operational and can be used. - // "CREATING" - The appliance is being deployed. + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "ACTIVE" - The rule is ready. + // "CREATING" - The rule is being created. + // "UPDATING" - The rule is being updated. + // "DELETING" - The rule is being deleted. State string `json:"state,omitempty"` - // Version: Version of the appliance. - Version string `json:"version,omitempty"` + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fqdn") to + // UpdateTime: Output only. Last update time of this resource. + 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. "Action") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -671,7 +951,7 @@ type Hcx struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fqdn") to include in API + // NullFields is a list of field names (e.g. "Action") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -680,50 +960,57 @@ type Hcx struct { NullFields []string `json:"-"` } -func (s *Hcx) MarshalJSON() ([]byte, error) { - type NoMethod Hcx +func (s *ExternalAccessRule) MarshalJSON() ([]byte, error) { + type NoMethod ExternalAccessRule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HcxActivationKey: HCX activation key. A default key is created during -// private cloud provisioning, but this behavior is subject to change -// and you should always verify active keys. Use -// VmwareEngine.ListHcxActivationKeys to retrieve existing keys and -// VmwareEngine.CreateHcxActivationKey to create new ones. -type HcxActivationKey struct { - // ActivationKey: Output only. HCX activation key. - ActivationKey string `json:"activationKey,omitempty"` - - // CreateTime: Output only. Creation time of HCX activation key. +// ExternalAddress: Represents an allocated external IP address and its +// corresponding internal IP address in a private cloud. +type ExternalAddress struct { + // CreateTime: Output only. Creation time of this resource. CreateTime string `json:"createTime,omitempty"` - // Name: Output only. The resource name of this HcxActivationKey. + // Description: User-provided description for this resource. + Description string `json:"description,omitempty"` + + // ExternalIp: Output only. The external IP address of a workload VM. + ExternalIp string `json:"externalIp,omitempty"` + + // InternalIp: The internal IP address of a workload VM. + InternalIp string `json:"internalIp,omitempty"` + + // Name: Output only. The resource name of this external IP address. // Resource names are schemeless URIs that follow the conventions in // https://cloud.google.com/apis/design/resource_names. For example: - // `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxA - // ctivationKeys/my-key` + // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ex + // ternalAddresses/my-address` Name string `json:"name,omitempty"` - // State: Output only. State of HCX activation key. + // State: Output only. The state of the resource. // // Possible values: - // "STATE_UNSPECIFIED" - Unspecified state. - // "AVAILABLE" - State of a newly generated activation key. - // "CONSUMED" - State of key when it has been used to activate HCX - // appliance. - // "CREATING" - State of key when it is being created. + // "STATE_UNSPECIFIED" - The default value. This value should never be + // used. + // "ACTIVE" - The address is ready. + // "CREATING" - The address is being created. + // "UPDATING" - The address is being updated. + // "DELETING" - The address is being deleted. State string `json:"state,omitempty"` // Uid: Output only. System-generated unique identifier for the // resource. Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. Last update time of this resource. + 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. "ActivationKey") to + // 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 @@ -731,120 +1018,119 @@ type HcxActivationKey struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActivationKey") 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. "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 *HcxActivationKey) MarshalJSON() ([]byte, error) { - type NoMethod HcxActivationKey +func (s *ExternalAddress) MarshalJSON() ([]byte, error) { + type NoMethod ExternalAddress raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListClustersResponse: Response message for VmwareEngine.ListClusters -type ListClustersResponse struct { - // Clusters: A list of private cloud clusters. - Clusters []*Cluster `json:"clusters,omitempty"` +// FetchNetworkPolicyExternalAddressesResponse: Response message for +// VmwareEngine.FetchNetworkPolicyExternalAddresses +type FetchNetworkPolicyExternalAddressesResponse struct { + // ExternalAddresses: A list of external IP addresses assigned to VMware + // workload VMs within the scope of the given network policy. + ExternalAddresses []*ExternalAddress `json:"externalAddresses,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"` - // Unreachable: Locations that could not be reached when making an - // aggregated query using wildcards. - Unreachable []string `json:"unreachable,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Clusters") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExternalAddresses") + // 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. "Clusters") 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. "ExternalAddresses") 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 *ListClustersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListClustersResponse +func (s *FetchNetworkPolicyExternalAddressesResponse) MarshalJSON() ([]byte, error) { + type NoMethod FetchNetworkPolicyExternalAddressesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListHcxActivationKeysResponse: Response message for -// VmwareEngine.ListHcxActivationKeys -type ListHcxActivationKeysResponse struct { - // HcxActivationKeys: List of HCX activation keys. - HcxActivationKeys []*HcxActivationKey `json:"hcxActivationKeys,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"` - - // Unreachable: Locations that could not be reached when making an - // aggregated query using wildcards. - Unreachable []string `json:"unreachable,omitempty"` +// ForwardingRule: A forwarding rule is a mapping of a `domain` to +// `name_servers`. This mapping allows VMware Engine to resolve domains +// for attached private clouds by forwarding DNS requests for a given +// domain to the specified nameservers. +type ForwardingRule struct { + // Domain: Required. Domain used to resolve a `name_servers` list. + Domain string `json:"domain,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // NameServers: Required. List of DNS servers to use for domain + // resolution + NameServers []string `json:"nameServers,omitempty"` - // ForceSendFields is a list of field names (e.g. "HcxActivationKeys") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Domain") 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. "HcxActivationKeys") 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. "Domain") 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 *ListHcxActivationKeysResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListHcxActivationKeysResponse +func (s *ForwardingRule) MarshalJSON() ([]byte, error) { + type NoMethod ForwardingRule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListLocationsResponse: The response message for -// Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*Location `json:"locations,omitempty"` - - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// GrantDnsBindPermissionRequest: Request message for +// VmwareEngine.GrantDnsBindPermission +type GrantDnsBindPermissionRequest struct { + // Principal: Required. The consumer provided user/service account which + // needs to be granted permission to bind with the intranet VPC + // corresponding to the consumer project. + Principal *Principal `json:"principal,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // RequestId: Optional. A request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server + // will know to ignore the request if it has already been completed. The + // server guarantees that a request doesn't result in creation of + // duplicate commitments for at least 60 minutes. For example, consider + // a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the + // server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. The request + // ID must be a valid UUID with the exception that zero UUID is not + // supported (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Locations") to + // ForceSendFields is a list of field names (e.g. "Principal") 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 @@ -852,7 +1138,7 @@ type ListLocationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in + // NullFields is a list of field names (e.g. "Principal") 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 @@ -861,32 +1147,33 @@ type ListLocationsResponse struct { NullFields []string `json:"-"` } -func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse +func (s *GrantDnsBindPermissionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GrantDnsBindPermissionRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListNetworkPoliciesResponse: Response message for -// VmwareEngine.ListNetworkPolicies -type ListNetworkPoliciesResponse struct { - // NetworkPolicies: A list of network policies. - NetworkPolicies []*NetworkPolicy `json:"networkPolicies,omitempty"` +// Hcx: Details about a HCX Cloud Manager appliance. +type Hcx struct { + // Fqdn: Fully qualified domain name of the appliance. + Fqdn string `json:"fqdn,omitempty"` - // NextPageToken: A token, which can be send as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` + // InternalIp: Internal IP address of the appliance. + InternalIp string `json:"internalIp,omitempty"` - // Unreachable: Locations that could not be reached when making an - // aggregated query using wildcards. - Unreachable []string `json:"unreachable,omitempty"` + // State: Output only. The state of the appliance. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified appliance state. This is the + // default value. + // "ACTIVE" - The appliance is operational and can be used. + // "CREATING" - The appliance is being deployed. + State string `json:"state,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Version: Version of the appliance. + Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkPolicies") to + // ForceSendFields is a list of field names (e.g. "Fqdn") 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 @@ -894,42 +1181,59 @@ type ListNetworkPoliciesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkPolicies") 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. "Fqdn") 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 *ListNetworkPoliciesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListNetworkPoliciesResponse +func (s *Hcx) MarshalJSON() ([]byte, error) { + type NoMethod Hcx raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListNodeTypesResponse: Response message for -// VmwareEngine.ListNodeTypes -type ListNodeTypesResponse 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"` +// HcxActivationKey: HCX activation key. A default key is created during +// private cloud provisioning, but this behavior is subject to change +// and you should always verify active keys. Use +// VmwareEngine.ListHcxActivationKeys to retrieve existing keys and +// VmwareEngine.CreateHcxActivationKey to create new ones. +type HcxActivationKey struct { + // ActivationKey: Output only. HCX activation key. + ActivationKey string `json:"activationKey,omitempty"` - // NodeTypes: A list of Node Types. - NodeTypes []*NodeType `json:"nodeTypes,omitempty"` + // CreateTime: Output only. Creation time of HCX activation key. + CreateTime string `json:"createTime,omitempty"` - // Unreachable: Locations that could not be reached when making an - // aggregated query using wildcards. - Unreachable []string `json:"unreachable,omitempty"` + // Name: Output only. The resource name of this HcxActivationKey. + // Resource names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxA + // ctivationKeys/my-key` + Name string `json:"name,omitempty"` + + // State: Output only. State of HCX activation key. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "AVAILABLE" - State of a newly generated activation key. + // "CONSUMED" - State of key when it has been used to activate HCX + // appliance. + // "CREATING" - State of key when it is being created. + State string `json:"state,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,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 + // ForceSendFields is a list of field names (e.g. "ActivationKey") 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 @@ -937,7 +1241,7 @@ type ListNodeTypesResponse struct { // 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 + // NullFields is a list of field names (e.g. "ActivationKey") 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 @@ -946,27 +1250,32 @@ type ListNodeTypesResponse struct { NullFields []string `json:"-"` } -func (s *ListNodeTypesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListNodeTypesResponse +func (s *HcxActivationKey) MarshalJSON() ([]byte, error) { + type NoMethod HcxActivationKey raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListOperationsResponse: The response message for -// Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// IpRange: An IP range provided in any one of the supported formats. +type IpRange struct { + // ExternalAddress: The name of an `ExternalAddress` resource. The + // external address must have been reserved in the scope of this + // external access rule's parent network policy. Provide the external + // address name in the form of + // `projects/{project}/locations/{location}/privateClouds/{private_cloud} + // /externalAddresses/{external_address}`. For example: + // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ex + // ternalAddresses/my-address`. + ExternalAddress string `json:"externalAddress,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*Operation `json:"operations,omitempty"` + // IpAddress: A single IP address. For example: `10.0.0.5`. + IpAddress string `json:"ipAddress,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // IpAddressRange: An IP address range in the CIDR format. For example: + // `10.0.0.0/24`. + IpAddressRange string `json:"ipAddressRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "ExternalAddress") 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 @@ -974,32 +1283,32 @@ type ListOperationsResponse struct { // 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 is a list of field names (e.g. "ExternalAddress") 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 *ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse +func (s *IpRange) MarshalJSON() ([]byte, error) { + type NoMethod IpRange raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListPrivateCloudsResponse: Response message for -// VmwareEngine.ListPrivateClouds -type ListPrivateCloudsResponse struct { +// ListClustersResponse: Response message for VmwareEngine.ListClusters +type ListClustersResponse struct { + // Clusters: A list of private cloud clusters. + Clusters []*Cluster `json:"clusters,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"` - // PrivateClouds: A list of private clouds. - PrivateClouds []*PrivateCloud `json:"privateClouds,omitempty"` - // Unreachable: Locations that could not be reached when making an // aggregated query using wildcards. Unreachable []string `json:"unreachable,omitempty"` @@ -1008,7 +1317,7 @@ type ListPrivateCloudsResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "Clusters") 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 @@ -1016,110 +1325,118 @@ type ListPrivateCloudsResponse struct { // 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 + // NullFields is a list of field names (e.g. "Clusters") 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 *ListPrivateCloudsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListPrivateCloudsResponse +func (s *ListClustersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListClustersResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListPrivateConnectionPeeringRoutesResponse: Response message for -// VmwareEngine.ListPrivateConnectionPeeringRoutes -type ListPrivateConnectionPeeringRoutesResponse struct { +// ListExternalAccessRulesResponse: Response message for +// VmwareEngine.ListExternalAccessRules +type ListExternalAccessRulesResponse struct { + // ExternalAccessRules: A list of external access firewall rules. + ExternalAccessRules []*ExternalAccessRule `json:"externalAccessRules,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"` - // PeeringRoutes: A list of peering routes. - PeeringRoutes []*PeeringRoute `json:"peeringRoutes,omitempty"` + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExternalAccessRules") + // 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 is a list of field names (e.g. "ExternalAccessRules") 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 *ListPrivateConnectionPeeringRoutesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListPrivateConnectionPeeringRoutesResponse +func (s *ListExternalAccessRulesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListExternalAccessRulesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListPrivateConnectionsResponse: Response message for -// VmwareEngine.ListPrivateConnections -type ListPrivateConnectionsResponse struct { +// ListExternalAddressesResponse: Response message for +// VmwareEngine.ListExternalAddresses +type ListExternalAddressesResponse struct { + // ExternalAddresses: A list of external IP addresses. + ExternalAddresses []*ExternalAddress `json:"externalAddresses,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"` - // PrivateConnections: A list of private connections. - PrivateConnections []*PrivateConnection `json:"privateConnections,omitempty"` - - // Unreachable: Unreachable resources. + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExternalAddresses") + // 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 is a list of field names (e.g. "ExternalAddresses") 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 *ListPrivateConnectionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListPrivateConnectionsResponse +func (s *ListExternalAddressesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListExternalAddressesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListSubnetsResponse: Response message for VmwareEngine.ListSubnets -type ListSubnetsResponse struct { +// ListHcxActivationKeysResponse: Response message for +// VmwareEngine.ListHcxActivationKeys +type ListHcxActivationKeysResponse struct { + // HcxActivationKeys: List of HCX activation keys. + HcxActivationKeys []*HcxActivationKey `json:"hcxActivationKeys,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"` - // Subnets: A list of subnets. - Subnets []*Subnet `json:"subnets,omitempty"` - // Unreachable: Locations that could not be reached when making an // aggregated query using wildcards. Unreachable []string `json:"unreachable,omitempty"` @@ -1128,48 +1445,45 @@ type ListSubnetsResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "HcxActivationKeys") + // 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 is a list of field names (e.g. "HcxActivationKeys") 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 *ListSubnetsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListSubnetsResponse +func (s *ListHcxActivationKeysResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListHcxActivationKeysResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListVmwareEngineNetworksResponse: Response message for -// VmwareEngine.ListVmwareEngineNetworks -type ListVmwareEngineNetworksResponse 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"` - - // Unreachable: Unreachable resources. - Unreachable []string `json:"unreachable,omitempty"` +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` - // VmwareEngineNetworks: A list of VMware Engine networks. - VmwareEngineNetworks []*VmwareEngineNetwork `json:"vmwareEngineNetworks,omitempty"` + // NextPageToken: The standard List next-page token. + 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. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "Locations") 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 @@ -1177,49 +1491,41 @@ type ListVmwareEngineNetworksResponse struct { // 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 + // NullFields is a list of field names (e.g. "Locations") 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 *ListVmwareEngineNetworksResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListVmwareEngineNetworksResponse +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Location: A resource that represents a Google Cloud location. -type Location struct { - // DisplayName: The friendly name for this location, typically a nearby - // city name. For example, "Tokyo". - DisplayName string `json:"displayName,omitempty"` - - // Labels: Cross-service attributes for the location. For example - // {"cloud.googleapis.com/region": "us-east1"} - Labels map[string]string `json:"labels,omitempty"` - - // LocationId: The canonical id for this location. For example: - // "us-east1". - LocationId string `json:"locationId,omitempty"` +// ListLoggingServersResponse: Response message for +// VmwareEngine.ListLoggingServers +type ListLoggingServersResponse struct { + // LoggingServers: A list of Logging Servers. + LoggingServers []*LoggingServer `json:"loggingServers,omitempty"` - // Metadata: Service-specific metadata. For example the available - // capacity at the given location. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // NextPageToken: A token, which can be send as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // Name: Resource name for the location, which may vary between - // implementations. For example: - // "projects/example-project/locations/us-east1" - Name string `json:"name,omitempty"` + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "LoggingServers") 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 @@ -1227,91 +1533,85 @@ type Location struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") 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. "LoggingServers") 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 *Location) MarshalJSON() ([]byte, error) { - type NoMethod Location +func (s *ListLoggingServersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLoggingServersResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ManagementCluster: Management cluster configuration. -type ManagementCluster struct { - // ClusterId: Required. The user-provided identifier of the new - // `Cluster`. The identifier must meet the following requirements: * - // Only contains 1-63 alphanumeric characters and hyphens * Begins with - // an alphabetical character * Ends with a non-hyphen character * Not - // formatted as a UUID * Complies with RFC 1034 - // (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - ClusterId string `json:"clusterId,omitempty"` +// ListManagementDnsZoneBindingsResponse: Response message for +// VmwareEngine.ListManagementDnsZoneBindings +type ListManagementDnsZoneBindingsResponse struct { + // ManagementDnsZoneBindings: A list of management DNS zone bindings. + ManagementDnsZoneBindings []*ManagementDnsZoneBinding `json:"managementDnsZoneBindings,omitempty"` - // NodeTypeConfigs: Required. The map of cluster node types in this - // cluster, where the key is canonical identifier of the node type - // (corresponds to the `NodeType`). - NodeTypeConfigs map[string]NodeTypeConfig `json:"nodeTypeConfigs,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"` - // ForceSendFields is a list of field names (e.g. "ClusterId") 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. + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "ManagementDnsZoneBindings") 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. "ClusterId") 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. + // "ManagementDnsZoneBindings") 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 *ManagementCluster) MarshalJSON() ([]byte, error) { - type NoMethod ManagementCluster +func (s *ListManagementDnsZoneBindingsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListManagementDnsZoneBindingsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkConfig: Network configuration in the consumer project with -// which the peering has to be done. -type NetworkConfig struct { - // ManagementCidr: Required. Management CIDR used by VMware management - // appliances. - ManagementCidr string `json:"managementCidr,omitempty"` +// ListNetworkPeeringsResponse: Response message for +// VmwareEngine.ListNetworkPeerings +type ListNetworkPeeringsResponse struct { + // NetworkPeerings: A list of network peerings. + NetworkPeerings []*NetworkPeering `json:"networkPeerings,omitempty"` - // ManagementIpAddressLayoutVersion: Output only. The IP address layout - // version of the management IP address range. Possible versions - // include: * `managementIpAddressLayoutVersion=1`: Indicates the legacy - // IP address layout used by some existing private clouds. This is no - // longer supported for new private clouds as it does not support all - // features. * `managementIpAddressLayoutVersion=2`: Indicates the - // latest IP address layout used by all newly created private clouds. - // This version supports all current features. - ManagementIpAddressLayoutVersion int64 `json:"managementIpAddressLayoutVersion,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"` - // VmwareEngineNetwork: Optional. The relative resource name of the - // VMware Engine network attached to the private cloud. Specify the name - // in the following form: - // `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_ - // engine_network_id}` where `{project}` can either be a project number - // or a project ID. - VmwareEngineNetwork string `json:"vmwareEngineNetwork,omitempty"` + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` - // VmwareEngineNetworkCanonical: Output only. The canonical name of the - // VMware Engine network in the form: - // `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{ - // vmware_engine_network_id}` - VmwareEngineNetworkCanonical string `json:"vmwareEngineNetworkCanonical,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ManagementCidr") to + // ForceSendFields is a list of field names (e.g. "NetworkPeerings") 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 @@ -1319,7 +1619,7 @@ 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. "ManagementCidr") to + // NullFields is a list of field names (e.g. "NetworkPeerings") 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 @@ -1329,74 +1629,32 @@ type NetworkConfig struct { NullFields []string `json:"-"` } -func (s *NetworkConfig) MarshalJSON() ([]byte, error) { - type NoMethod NetworkConfig +func (s *ListNetworkPeeringsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListNetworkPeeringsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkPolicy: Represents a network policy resource. Network policies -// are regional resources. You can use a network policy to enable or -// disable internet access and external IP access. Network policies are -// associated with a VMware Engine network, which might span across -// regions. For a given region, a network policy applies to all private -// clouds in the VMware Engine network associated with the policy. -type NetworkPolicy struct { - // CreateTime: Output only. Creation time of this resource. - CreateTime string `json:"createTime,omitempty"` - - // Description: Optional. User-provided description for this network - // policy. - Description string `json:"description,omitempty"` - - // EdgeServicesCidr: Required. IP address range in CIDR notation used to - // create internet access and external IP access. An RFC 1918 CIDR - // block, with a "/26" prefix, is required. The range cannot overlap - // with any prefixes either in the consumer VPC network or in use by the - // private clouds attached to that VPC network. - EdgeServicesCidr string `json:"edgeServicesCidr,omitempty"` - - // ExternalIp: Network service that allows External IP addresses to be - // assigned to VMware workloads. This service can only be enabled when - // `internet_access` is also enabled. - ExternalIp *NetworkService `json:"externalIp,omitempty"` - - // InternetAccess: Network service that allows VMware workloads to - // access the internet. - InternetAccess *NetworkService `json:"internetAccess,omitempty"` - - // Name: Output only. The resource name of this network policy. Resource - // names are schemeless URIs that follow the conventions in - // https://cloud.google.com/apis/design/resource_names. For example: - // `projects/my-project/locations/us-central1/networkPolicies/my-network- - // policy` - Name string `json:"name,omitempty"` - - // Uid: Output only. System-generated unique identifier for the - // resource. - Uid string `json:"uid,omitempty"` - - // UpdateTime: Output only. Last update time of this resource. - UpdateTime string `json:"updateTime,omitempty"` +// ListNetworkPoliciesResponse: Response message for +// VmwareEngine.ListNetworkPolicies +type ListNetworkPoliciesResponse struct { + // NetworkPolicies: A list of network policies. + NetworkPolicies []*NetworkPolicy `json:"networkPolicies,omitempty"` - // VmwareEngineNetwork: Optional. The relative resource name of the - // VMware Engine network. Specify the name in the following form: - // `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_ - // engine_network_id}` where `{project}` can either be a project number - // or a project ID. - VmwareEngineNetwork string `json:"vmwareEngineNetwork,omitempty"` + // NextPageToken: A token, which can be send as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // VmwareEngineNetworkCanonical: Output only. The canonical name of the - // VMware Engine network in the form: - // `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{ - // vmware_engine_network_id}` - VmwareEngineNetworkCanonical string `json:"vmwareEngineNetworkCanonical,omitempty"` + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "NetworkPolicies") 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 @@ -1404,43 +1662,42 @@ type NetworkPolicy struct { // 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 is a list of field names (e.g. "NetworkPolicies") 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 *NetworkPolicy) MarshalJSON() ([]byte, error) { - type NoMethod NetworkPolicy +func (s *ListNetworkPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListNetworkPoliciesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkService: Represents a network service that is managed by a -// `NetworkPolicy` resource. A network service provides a way to control -// an aspect of external access to VMware workloads. For example, -// whether the VMware workloads in the private clouds governed by a -// network policy can access or be accessed from the internet. -type NetworkService struct { - // Enabled: True if the service is enabled; false otherwise. - Enabled bool `json:"enabled,omitempty"` +// ListNodeTypesResponse: Response message for +// VmwareEngine.ListNodeTypes +type ListNodeTypesResponse 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"` - // State: Output only. State of the service. New values may be added to - // this enum when appropriate. - // - // Possible values: - // "STATE_UNSPECIFIED" - Unspecified service state. This is the - // default value. - // "UNPROVISIONED" - Service is not provisioned. - // "RECONCILING" - Service is in the process of being - // provisioned/deprovisioned. - // "ACTIVE" - Service is active. - State string `json:"state,omitempty"` + // NodeTypes: A list of Node Types. + NodeTypes []*NodeType `json:"nodeTypes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enabled") to + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1448,99 +1705,36 @@ type NetworkService struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") 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. "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 *NetworkService) MarshalJSON() ([]byte, error) { - type NoMethod NetworkService +func (s *ListNodeTypesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListNodeTypesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeType: Describes node type. -type NodeType struct { - // AvailableCustomCoreCounts: Output only. List of possible values of - // custom core count. - AvailableCustomCoreCounts []int64 `json:"availableCustomCoreCounts,omitempty"` - - // DiskSizeGb: Output only. The amount of storage available, defined in - // GB. - DiskSizeGb int64 `json:"diskSizeGb,omitempty"` - - // DisplayName: Output only. The friendly name for this node type. For - // example: ve1-standard-72 - DisplayName string `json:"displayName,omitempty"` - - // MemoryGb: Output only. The amount of physical memory available, - // defined in GB. - MemoryGb int64 `json:"memoryGb,omitempty"` - - // Name: Output only. The resource name of this node type. Resource - // names are schemeless URIs that follow the conventions in - // https://cloud.google.com/apis/design/resource_names. For example: - // `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - Name string `json:"name,omitempty"` - - // NodeTypeId: Output only. The canonical identifier of the node type - // (corresponds to the `NodeType`). For example: standard-72. - NodeTypeId string `json:"nodeTypeId,omitempty"` - - // TotalCoreCount: Output only. The total number of CPU cores in a - // single node. - TotalCoreCount int64 `json:"totalCoreCount,omitempty"` +// ListNodesResponse: Response message for VmwareEngine.ListNodes +type ListNodesResponse 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"` - // VirtualCpuCount: Output only. The total number of virtual CPUs in a - // single node. - VirtualCpuCount int64 `json:"virtualCpuCount,omitempty"` + // Nodes: The nodes. + Nodes []*Node `json:"nodes,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "AvailableCustomCoreCounts") 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. - // "AvailableCustomCoreCounts") 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 *NodeType) MarshalJSON() ([]byte, error) { - type NoMethod NodeType - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// NodeTypeConfig: Information about the type and number of nodes -// associated with the cluster. -type NodeTypeConfig struct { - // CustomCoreCount: Optional. Customized number of cores available to - // each node of the type. This number must always be one of - // `nodeType.availableCustomCoreCounts`. If zero is provided max value - // from `nodeType.availableCustomCoreCounts` will be used. - CustomCoreCount int64 `json:"customCoreCount,omitempty"` - - // NodeCount: Required. The number of nodes of this type in the cluster - NodeCount int64 `json:"nodeCount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomCoreCount") to + // 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 @@ -1548,43 +1742,36 @@ type NodeTypeConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomCoreCount") 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. "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 *NodeTypeConfig) MarshalJSON() ([]byte, error) { - type NoMethod NodeTypeConfig +func (s *ListNodesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListNodesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Nsx: Details about a NSX Manager appliance. -type Nsx struct { - // Fqdn: Fully qualified domain name of the appliance. - Fqdn string `json:"fqdn,omitempty"` - - // InternalIp: Internal IP address of the appliance. - InternalIp string `json:"internalIp,omitempty"` +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` - // State: Output only. The state of the appliance. - // - // Possible values: - // "STATE_UNSPECIFIED" - Unspecified appliance state. This is the - // default value. - // "ACTIVE" - The appliance is operational and can be used. - // "CREATING" - The appliance is being deployed. - State string `json:"state,omitempty"` + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` - // Version: Version of the appliance. - Version string `json:"version,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Fqdn") to + // 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 @@ -1592,61 +1779,37 @@ type Nsx struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fqdn") 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. "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 *Nsx) MarshalJSON() ([]byte, error) { - type NoMethod Nsx +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// 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"` +// ListPeeringRoutesResponse: Response message for +// VmwareEngine.ListPeeringRoutes +type ListPeeringRoutesResponse 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"` - // 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"` + // PeeringRoutes: A list of peering routes. + PeeringRoutes []*PeeringRoute `json:"peeringRoutes,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 + // 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 @@ -1654,51 +1817,41 @@ type Operation struct { // 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 + // 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 *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation +func (s *ListPeeringRoutesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPeeringRoutesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OperationMetadata: Represents the metadata of the long-running -// operation. -type OperationMetadata struct { - // ApiVersion: Output only. API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - - // CreateTime: Output only. The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: Output only. The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - - // RequestedCancellation: Output only. True if the user has requested - // cancellation of the operation; false otherwise. Operations that have - // successfully been cancelled have Operation.error value with a - // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. - RequestedCancellation bool `json:"requestedCancellation,omitempty"` +// ListPrivateCloudsResponse: Response message for +// VmwareEngine.ListPrivateClouds +type ListPrivateCloudsResponse 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"` - // StatusMessage: Output only. Human-readable status of the operation, - // if any. - StatusMessage string `json:"statusMessage,omitempty"` + // PrivateClouds: A list of private clouds. + PrivateClouds []*PrivateCloud `json:"privateClouds,omitempty"` - // Target: Output only. Server-defined resource path for the target of - // the operation. - Target string `json:"target,omitempty"` + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` - // Verb: Output only. Name of the verb executed by the operation. - Verb string `json:"verb,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // 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 @@ -1706,68 +1859,37 @@ type OperationMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApiVersion") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // 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 *OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod OperationMetadata +func (s *ListPrivateCloudsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPrivateCloudsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PeeringRoute: Exchanged network peering route. -type PeeringRoute struct { - // DestRange: Output only. Destination range of the peering route in - // CIDR notation. - DestRange string `json:"destRange,omitempty"` - - // Direction: Output only. Direction of the routes exchanged with the - // peer network, from the VMware Engine network perspective: * Routes of - // direction `INCOMING` are imported from the peer network. * Routes of - // direction `OUTGOING` are exported from the intranet VPC network of - // the VMware Engine network. - // - // Possible values: - // "DIRECTION_UNSPECIFIED" - Unspecified exchanged routes direction. - // This is default. - // "INCOMING" - Routes imported from the peer network. - // "OUTGOING" - Routes exported to the peer network. - Direction string `json:"direction,omitempty"` - - // Imported: Output only. True if the peering route has been imported - // from a peered VPC network; false otherwise. The import happens if the - // field `NetworkPeering.importCustomRoutes` is true for this network, - // `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, - // and the import does not result in a route conflict. - Imported bool `json:"imported,omitempty"` - - // NextHopRegion: Output only. Region containing the next hop of the - // peering route. This field only applies to dynamic routes in the peer - // VPC network. - NextHopRegion string `json:"nextHopRegion,omitempty"` +// ListPrivateConnectionPeeringRoutesResponse: Response message for +// VmwareEngine.ListPrivateConnectionPeeringRoutes +type ListPrivateConnectionPeeringRoutesResponse 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"` - // Priority: Output only. The priority of the peering route. - Priority int64 `json:"priority,omitempty,string"` + // PeeringRoutes: A list of peering routes. + PeeringRoutes []*PeeringRoute `json:"peeringRoutes,omitempty"` - // Type: Output only. Type of the route in the peer VPC network. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified peering route type. This is the - // default value. - // "DYNAMIC_PEERING_ROUTE" - Dynamic routes in the peer network. - // "STATIC_PEERING_ROUTE" - Static routes in the peer network. - // "SUBNET_PEERING_ROUTE" - Created, updated, and removed - // automatically by Google Cloud when subnets are created, modified, or - // deleted in the peer network. - 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. "DestRange") to + // 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 @@ -1775,109 +1897,40 @@ type PeeringRoute struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DestRange") 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. "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 *PeeringRoute) MarshalJSON() ([]byte, error) { - type NoMethod PeeringRoute +func (s *ListPrivateConnectionPeeringRoutesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPrivateConnectionPeeringRoutesResponse 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 -// 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 < 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 < -// 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/). -type Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` - - // Bindings: Associates a list of `members`, or principals, with a - // `role`. Optionally, may specify a `condition` that determines how and - // when the `bindings` are applied. Each of the `bindings` must contain - // at least one principal. The `bindings` in a `Policy` can refer to up - // to 1,500 principals; up to 250 of these principals can be Google - // groups. Each occurrence of a principal counts towards these limits. - // For example, if the `bindings` grant 50 different roles to - // `user:alice@example.com`, and not to any other principal, then you - // can add another 1,450 principals to the `bindings` in the `Policy`. - Bindings []*Binding `json:"bindings,omitempty"` +// ListPrivateConnectionsResponse: Response message for +// VmwareEngine.ListPrivateConnections +type ListPrivateConnectionsResponse 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"` - // Etag: `etag` is used for optimistic concurrency control as a way to - // help prevent simultaneous updates of a policy from overwriting each - // other. It is strongly suggested that systems make use of the `etag` - // in the read-modify-write cycle to perform policy updates in order to - // avoid race conditions: An `etag` is returned in the response to - // `getIamPolicy`, and systems are expected to put that etag in the - // request to `setIamPolicy` to ensure that their change will be applied - // to the same version of the policy. **Important:** If you use IAM - // Conditions, you must include the `etag` field whenever you call - // `setIamPolicy`. If you omit this field, then IAM allows you to - // overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. - Etag string `json:"etag,omitempty"` + // PrivateConnections: A list of private connections. + PrivateConnections []*PrivateConnection `json:"privateConnections,omitempty"` - // Version: Specifies the format of the policy. Valid values are `0`, - // `1`, and `3`. Requests that specify an invalid value are rejected. - // Any operation that affects conditional role bindings must specify - // version `3`. This requirement applies to the following operations: * - // Getting a policy that includes a conditional role binding * Adding a - // conditional role binding to a policy * Changing a conditional role - // binding in a policy * Removing any role binding, with or without a - // condition, from a policy that includes conditions **Important:** If - // you use IAM Conditions, you must include the `etag` field whenever - // you call `setIamPolicy`. If you omit this field, then IAM allows you - // to overwrite a version `3` policy with a version `1` policy, and all - // of the conditions in the version `3` policy are lost. If a policy - // does not include any conditions, operations on that policy may - // specify any valid version or leave the field unset. To learn which - // resources support conditions in their IAM policies, see the IAM - // documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Version int64 `json:"version,omitempty"` + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // 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 @@ -1885,7 +1938,7 @@ type Policy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditConfigs") to include + // 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 @@ -1894,95 +1947,122 @@ type Policy struct { NullFields []string `json:"-"` } -func (s *Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy +func (s *ListPrivateConnectionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPrivateConnectionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PrivateCloud: Represents a private cloud resource. Private clouds of -// type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` -// private clouds are regional. -type PrivateCloud struct { - // CreateTime: Output only. Creation time of this resource. - CreateTime string `json:"createTime,omitempty"` +// ListSubnetsResponse: Response message for VmwareEngine.ListSubnets +type ListSubnetsResponse 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"` - // DeleteTime: Output only. Time when the resource was scheduled for - // deletion. - DeleteTime string `json:"deleteTime,omitempty"` + // Subnets: A list of subnets. + Subnets []*Subnet `json:"subnets,omitempty"` - // Description: User-provided description for this private cloud. - Description string `json:"description,omitempty"` + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` - // ExpireTime: Output only. Time when the resource will be irreversibly - // deleted. - ExpireTime string `json:"expireTime,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // Hcx: Output only. HCX appliance. - Hcx *Hcx `json:"hcx,omitempty"` + // 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:"-"` - // ManagementCluster: Required. Input only. The management cluster for - // this private cloud. This field is required during creation of the - // private cloud to provide details for the default cluster. The - // following fields can't be changed after private cloud creation: - // `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. - ManagementCluster *ManagementCluster `json:"managementCluster,omitempty"` + // 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:"-"` +} - // Name: Output only. The resource name of this private cloud. Resource - // names are schemeless URIs that follow the conventions in - // https://cloud.google.com/apis/design/resource_names. For example: - // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - Name string `json:"name,omitempty"` +func (s *ListSubnetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSubnetsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // NetworkConfig: Required. Network configuration of the private cloud. - NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` +// ListVmwareEngineNetworksResponse: Response message for +// VmwareEngine.ListVmwareEngineNetworks +type ListVmwareEngineNetworksResponse 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"` - // Nsx: Output only. NSX appliance. - Nsx *Nsx `json:"nsx,omitempty"` + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` - // State: Output only. State of the resource. New values may be added to - // this enum when appropriate. - // - // Possible values: - // "STATE_UNSPECIFIED" - The default value. This value should never be - // used. - // "ACTIVE" - The private cloud is ready. - // "CREATING" - The private cloud is being created. - // "UPDATING" - The private cloud is being updated. - // "FAILED" - The private cloud is in failed state. - // "DELETED" - The private cloud is scheduled for deletion. The - // deletion process can be cancelled by using the corresponding undelete - // method. - // "PURGING" - The private cloud is irreversibly deleted and is being - // removed from the system. - State string `json:"state,omitempty"` + // VmwareEngineNetworks: A list of VMware Engine networks. + VmwareEngineNetworks []*VmwareEngineNetwork `json:"vmwareEngineNetworks,omitempty"` - // Type: Optional. Type of the private cloud. Defaults to STANDARD. - // - // Possible values: - // "STANDARD" - Standard private is a zonal resource, with 3+ nodes. - // Default type. - // "TIME_LIMITED" - Time limited private cloud is a zonal resource, - // can have only 1 node and has limited life span. Will be deleted after - // defined period of time, can be converted into standard private cloud - // by expanding it up to 3 or more nodes. - Type string `json:"type,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // Uid: Output only. System-generated unique identifier for the - // resource. - Uid string `json:"uid,omitempty"` + // 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:"-"` - // UpdateTime: Output only. Last update time of this resource. - UpdateTime string `json:"updateTime,omitempty"` + // 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:"-"` +} - // Vcenter: Output only. Vcenter appliance. - Vcenter *Vcenter `json:"vcenter,omitempty"` +func (s *ListVmwareEngineNetworksResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListVmwareEngineNetworksResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "DisplayName") 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 @@ -1990,107 +2070,96 @@ type PrivateCloud struct { // 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 + // NullFields is a list of field names (e.g. "DisplayName") 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 *PrivateCloud) MarshalJSON() ([]byte, error) { - type NoMethod PrivateCloud +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PrivateConnection: Private connection resource that provides -// connectivity for VMware Engine private clouds. -type PrivateConnection struct { +// LocationMetadata: VmwareEngine specific metadata for the given +// google.cloud.location.Location. It is returned as a content of the +// `google.cloud.location.Location.metadata` field. +type LocationMetadata struct { + // Capabilities: Output only. Capabilities of this location. + // + // Possible values: + // "CAPABILITY_UNSPECIFIED" - The default value. This value is used if + // the capability is omitted or unknown. + // "STRETCHED_CLUSTERS" - Stretch clusters are supported in this + // location. + Capabilities []string `json:"capabilities,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Capabilities") 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. "Capabilities") 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 *LocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod LocationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LoggingServer: Logging server to receive vCenter or ESXi logs. +type LoggingServer struct { // CreateTime: Output only. Creation time of this resource. CreateTime string `json:"createTime,omitempty"` - // Description: Optional. User-provided description for this private - // connection. - Description string `json:"description,omitempty"` + // Hostname: Required. Fully-qualified domain name (FQDN) or IP Address + // of the logging server. + Hostname string `json:"hostname,omitempty"` - // Name: Output only. The resource name of the private connection. - // Resource names are schemeless URIs that follow the conventions in + // Name: Output only. The resource name of this logging server. Resource + // names are schemeless URIs that follow the conventions in // https://cloud.google.com/apis/design/resource_names. For example: - // `projects/my-project/locations/us-central1/privateConnections/my-conne - // ction` + // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/lo + // ggingServers/my-logging-server` Name string `json:"name,omitempty"` - // PeeringId: Output only. VPC network peering id between given network - // VPC and VMwareEngineNetwork. - PeeringId string `json:"peeringId,omitempty"` + // Port: Required. Port number at which the logging server receives + // logs. + Port int64 `json:"port,omitempty"` - // PeeringState: Output only. Peering state between service network and - // VMware Engine network. + // Protocol: Required. Protocol used by vCenter to send logs to a + // logging server. // // Possible values: - // "PEERING_STATE_UNSPECIFIED" - The default value. This value is used - // if the peering state is omitted or unknown. - // "PEERING_ACTIVE" - The peering is in active state. - // "PEERING_INACTIVE" - The peering is in inactive state. - PeeringState string `json:"peeringState,omitempty"` - - // RoutingMode: Optional. Routing Mode. Default value is set to GLOBAL. - // For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or - // REGIONAL, for other types only GLOBAL is supported. + // "PROTOCOL_UNSPECIFIED" - Unspecified communications protocol. This + // is the default value. + // "UDP" - UDP + // "TCP" - TCP + Protocol string `json:"protocol,omitempty"` + + // SourceType: Required. The type of component that produces logs that + // will be forwarded to this logging server. // // Possible values: - // "ROUTING_MODE_UNSPECIFIED" - The default value. This value should + // "SOURCE_TYPE_UNSPECIFIED" - The default value. This value should // never be used. - // "GLOBAL" - Global Routing Mode - // "REGIONAL" - Regional Routing Mode - RoutingMode string `json:"routingMode,omitempty"` - - // ServiceNetwork: Required. Service network to create private - // connection. Specify the name in the following form: - // `projects/{project}/global/networks/{network_id}` For type = - // PRIVATE_SERVICE_ACCESS, this field represents servicenetworking VPC, - // e.g. projects/project-tp/global/networks/servicenetworking. For type - // = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, e.g. - // projects/project-tp/global/networks/netapp-tenant-vpc. For type = - // DELL_POWERSCALE, this field represent Dell service VPC, e.g. - // projects/project-tp/global/networks/dell-tenant-vpc. For type= - // THIRD_PARTY_SERVICE, this field could represent a consumer VPC or any - // other producer VPC to which the VMware Engine Network needs to be - // connected, e.g. projects/project/global/networks/vpc. - ServiceNetwork string `json:"serviceNetwork,omitempty"` - - // State: Output only. State of the private connection. - // - // Possible values: - // "STATE_UNSPECIFIED" - The default value. This value is used if the - // state is omitted. - // "CREATING" - The private connection is being created. - // "ACTIVE" - The private connection is ready. - // "UPDATING" - The private connection is being updated. - // "DELETING" - The private connection is being deleted. - // "UNPROVISIONED" - The private connection is not provisioned, since - // no private cloud is present for which this private connection is - // needed. - // "FAILED" - The private connection is in failed state. - State string `json:"state,omitempty"` - - // Type: Required. Private connection type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - The default value. This value should never be - // used. - // "PRIVATE_SERVICE_ACCESS" - Connection used for establishing - // [private services - // access](https://cloud.google.com/vpc/docs/private-services-access). - // "NETAPP_CLOUD_VOLUMES" - Connection used for connecting to NetApp - // Cloud Volumes. - // "DELL_POWERSCALE" - Connection used for connecting to Dell - // PowerScale. - // "THIRD_PARTY_SERVICE" - Connection used for connecting to - // third-party services. - Type string `json:"type,omitempty"` + // "ESXI" - Logs produced by ESXI hosts + // "VCSA" - Logs produced by vCenter server + SourceType string `json:"sourceType,omitempty"` // Uid: Output only. System-generated unique identifier for the // resource. @@ -2099,23 +2168,6 @@ type PrivateConnection struct { // UpdateTime: Output only. Last update time of this resource. UpdateTime string `json:"updateTime,omitempty"` - // VmwareEngineNetwork: Required. The relative resource name of Legacy - // VMware Engine network. Specify the name in the following form: - // `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_ - // engine_network_id}` where `{project}`, `{location}` will be same as - // specified in private connection resource name and - // `{vmware_engine_network_id}` will be in the form of - // `{location}`-default e.g. - // projects/project/locations/us-central1/vmwareEngineNetworks/us-central - // 1-default. - VmwareEngineNetwork string `json:"vmwareEngineNetwork,omitempty"` - - // VmwareEngineNetworkCanonical: Output only. The canonical name of the - // VMware Engine network in the form: - // `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{ - // vmware_engine_network_id}` - VmwareEngineNetworkCanonical string `json:"vmwareEngineNetworkCanonical,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -2137,30 +2189,32 @@ type PrivateConnection struct { NullFields []string `json:"-"` } -func (s *PrivateConnection) MarshalJSON() ([]byte, error) { - type NoMethod PrivateConnection +func (s *LoggingServer) MarshalJSON() ([]byte, error) { + type NoMethod LoggingServer raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResetNsxCredentialsRequest: Request message for -// VmwareEngine.ResetNsxCredentials -type ResetNsxCredentialsRequest struct { - // RequestId: Optional. A request ID to identify requests. Specify a - // unique request ID so that if you must retry your request, the server - // will know to ignore the request if it has already been completed. The - // server guarantees that a request doesn't result in creation of - // duplicate commitments for at least 60 minutes. For example, consider - // a situation where you make an initial request and the request times - // out. If you make the request again with the same request ID, the - // server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents - // clients from accidentally creating duplicate commitments. The request - // ID must be a valid UUID with the exception that zero UUID is not - // supported (00000000-0000-0000-0000-000000000000). - RequestId string `json:"requestId,omitempty"` +// ManagementCluster: Management cluster configuration. +type ManagementCluster struct { + // ClusterId: Required. The user-provided identifier of the new + // `Cluster`. The identifier must meet the following requirements: * + // Only contains 1-63 alphanumeric characters and hyphens * Begins with + // an alphabetical character * Ends with a non-hyphen character * Not + // formatted as a UUID * Complies with RFC 1034 + // (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + ClusterId string `json:"clusterId,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestId") to + // NodeTypeConfigs: Required. The map of cluster node types in this + // cluster, where the key is canonical identifier of the node type + // (corresponds to the `NodeType`). + NodeTypeConfigs map[string]NodeTypeConfig `json:"nodeTypeConfigs,omitempty"` + + // StretchedClusterConfig: Optional. Configuration of a stretched + // cluster. Required for STRETCHED private clouds. + StretchedClusterConfig *StretchedClusterConfig `json:"stretchedClusterConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterId") 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 @@ -2168,7 +2222,7 @@ type ResetNsxCredentialsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestId") to include in + // NullFields is a list of field names (e.g. "ClusterId") 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 @@ -2177,67 +2231,69 @@ type ResetNsxCredentialsRequest struct { NullFields []string `json:"-"` } -func (s *ResetNsxCredentialsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ResetNsxCredentialsRequest +func (s *ManagementCluster) MarshalJSON() ([]byte, error) { + type NoMethod ManagementCluster raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResetVcenterCredentialsRequest: Request message for -// VmwareEngine.ResetVcenterCredentials -type ResetVcenterCredentialsRequest struct { - // RequestId: Optional. A request ID to identify requests. Specify a - // unique request ID so that if you must retry your request, the server - // will know to ignore the request if it has already been completed. The - // server guarantees that a request doesn't result in creation of - // duplicate commitments for at least 60 minutes. For example, consider - // a situation where you make an initial request and the request times - // out. If you make the request again with the same request ID, the - // server can check if original operation with the same request ID was - // received, and if so, will ignore the second request. This prevents - // clients from accidentally creating duplicate commitments. The request - // ID must be a valid UUID with the exception that zero UUID is not - // supported (00000000-0000-0000-0000-000000000000). - RequestId string `json:"requestId,omitempty"` +// ManagementDnsZoneBinding: Represents a binding between a network and +// the management DNS zone. A management DNS zone is the Cloud DNS +// cross-project binding zone that VMware Engine creates for each +// private cloud. It contains FQDNs and corresponding IP addresses for +// the private cloud's ESXi hosts and management VM appliances like +// vCenter and NSX Manager. +type ManagementDnsZoneBinding struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // Description: User-provided description for this resource. + Description string `json:"description,omitempty"` - // NullFields is a list of field names (e.g. "RequestId") 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:"-"` -} + // Name: Output only. The resource name of this binding. Resource names + // are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ma + // nagementDnsZoneBindings/my-management-dns-zone-binding` + Name string `json:"name,omitempty"` -func (s *ResetVcenterCredentialsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ResetVcenterCredentialsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // State: Output only. The state of the resource. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value should never be + // used. + // "ACTIVE" - The binding is ready. + // "CREATING" - The binding is being created. + // "UPDATING" - The binding is being updated. + // "DELETING" - The binding is being deleted. + // "FAILED" - The binding has failed. + State string `json:"state,omitempty"` -// SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type SetIamPolicyRequest struct { - // Policy: REQUIRED: The complete policy to be applied to the - // `resource`. The size of the policy is limited to a few 10s of KB. An - // empty policy is a valid policy but certain Google Cloud services - // (such as Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` - // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the - // policy to modify. Only the fields in the mask will be modified. If no - // mask is provided, the following default mask is used: `paths: - // "bindings, etag" - UpdateMask string `json:"updateMask,omitempty"` + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to + // VmwareEngineNetwork: Network to bind is a VMware Engine network. + // Specify the name in the following form for VMware engine network: + // `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engi + // ne_network_id}`. `{project}` can either be a project number or a + // project ID. + VmwareEngineNetwork string `json:"vmwareEngineNetwork,omitempty"` + + // VpcNetwork: Network to bind is a standard consumer VPC. Specify the + // name in the following form for consumer VPC network: + // `projects/{project}/global/networks/{network_id}`. `{project}` can + // either be a project number or a project ID. + VpcNetwork string `json:"vpcNetwork,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 @@ -2245,8 +2301,8 @@ type SetIamPolicyRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty + // 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. @@ -2254,34 +2310,50 @@ type SetIamPolicyRequest struct { NullFields []string `json:"-"` } -func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetIamPolicyRequest +func (s *ManagementDnsZoneBinding) MarshalJSON() ([]byte, error) { + type NoMethod ManagementDnsZoneBinding raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Status: The `Status` type defines a logical error model that is -// suitable for different programming environments, including REST APIs -// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// `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"` +// NetworkConfig: Network configuration in the consumer project with +// which the peering has to be done. +type NetworkConfig struct { + // DnsServerIp: Output only. DNS Server IP of the Private Cloud. All DNS + // queries can be forwarded to this address for name resolution of + // Private Cloud's management entities like vCenter, NSX-T Manager and + // ESXi hosts. + DnsServerIp string `json:"dnsServerIp,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"` + // ManagementCidr: Required. Management CIDR used by VMware management + // appliances. + ManagementCidr string `json:"managementCidr,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"` + // ManagementIpAddressLayoutVersion: Output only. The IP address layout + // version of the management IP address range. Possible versions + // include: * `managementIpAddressLayoutVersion=1`: Indicates the legacy + // IP address layout used by some existing private clouds. This is no + // longer supported for new private clouds as it does not support all + // features. * `managementIpAddressLayoutVersion=2`: Indicates the + // latest IP address layout used by all newly created private clouds. + // This version supports all current features. + ManagementIpAddressLayoutVersion int64 `json:"managementIpAddressLayoutVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // VmwareEngineNetwork: Optional. The relative resource name of the + // VMware Engine network attached to the private cloud. Specify the name + // in the following form: + // `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_ + // engine_network_id}` where `{project}` can either be a project number + // or a project ID. + VmwareEngineNetwork string `json:"vmwareEngineNetwork,omitempty"` + + // VmwareEngineNetworkCanonical: Output only. The canonical name of the + // VMware Engine network in the form: + // `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{ + // vmware_engine_network_id}` + VmwareEngineNetworkCanonical string `json:"vmwareEngineNetworkCanonical,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DnsServerIp") 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 @@ -2289,64 +2361,141 @@ type Status struct { // 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 + // NullFields is a list of field names (e.g. "DnsServerIp") 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 +func (s *NetworkConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Subnet: Subnet in a private cloud. Either `management` subnets (such -// as vMotion) that are read-only, or `userDefined`, which can also be -// updated. -type Subnet struct { - // GatewayIp: The IP address of the gateway of this subnet. Must fall - // within the IP prefix defined above. - GatewayIp string `json:"gatewayIp,omitempty"` +// NetworkPeering: Details of a network peering. +type NetworkPeering struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` - // IpCidrRange: The IP address range of the subnet in CIDR format - // '10.0.0.0/24'. - IpCidrRange string `json:"ipCidrRange,omitempty"` + // Description: Optional. User-provided description for this network + // peering. + Description string `json:"description,omitempty"` - // Name: Output only. The resource name of this subnet. Resource names - // are schemeless URIs that follow the conventions in + // ExchangeSubnetRoutes: Optional. True if full mesh connectivity is + // created and managed automatically between peered networks; false + // otherwise. Currently this field is always true because Google Compute + // Engine automatically creates and manages subnetwork routes between + // two VPC networks when peering state is 'ACTIVE'. + ExchangeSubnetRoutes bool `json:"exchangeSubnetRoutes,omitempty"` + + // ExportCustomRoutes: Optional. True if custom routes are exported to + // the peered network; false otherwise. The default value is true. + ExportCustomRoutes bool `json:"exportCustomRoutes,omitempty"` + + // ExportCustomRoutesWithPublicIp: Optional. True if all subnet routes + // with a public IP address range are exported; false otherwise. The + // default value is true. IPv4 special-use ranges + // (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always + // exported to peers and are not controlled by this field. + ExportCustomRoutesWithPublicIp bool `json:"exportCustomRoutesWithPublicIp,omitempty"` + + // ImportCustomRoutes: Optional. True if custom routes are imported from + // the peered network; false otherwise. The default value is true. + ImportCustomRoutes bool `json:"importCustomRoutes,omitempty"` + + // ImportCustomRoutesWithPublicIp: Optional. True if all subnet routes + // with public IP address range are imported; false otherwise. The + // default value is true. IPv4 special-use ranges + // (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always + // imported to peers and are not controlled by this field. + ImportCustomRoutesWithPublicIp bool `json:"importCustomRoutesWithPublicIp,omitempty"` + + // Name: Output only. The resource name of the network peering. Resource + // names are scheme-less URIs that follow the conventions in // https://cloud.google.com/apis/design/resource_names. For example: - // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/su - // bnets/my-subnet` + // `projects/my-project/locations/global/networkPeerings/my-peering` Name string `json:"name,omitempty"` - // State: Output only. The state of the resource. + // PeerMtu: Optional. Maximum transmission unit (MTU) in bytes. The + // default value is `1500`. If a value of `0` is provided for this + // field, VMware Engine uses the default value instead. + PeerMtu int64 `json:"peerMtu,omitempty"` + + // PeerNetwork: Required. The relative resource name of the network to + // peer with a standard VMware Engine network. The provided network can + // be a consumer VPC network or another standard VMware Engine network. + // If the `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name + // in the form: + // `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engi + // ne_network_id}`. Otherwise specify the name in the form: + // `projects/{project}/global/networks/{network_id}`, where `{project}` + // can either be a project number or a project ID. + PeerNetwork string `json:"peerNetwork,omitempty"` + + // PeerNetworkType: Required. The type of the network to peer with the + // VMware Engine network. // // Possible values: - // "STATE_UNSPECIFIED" - The default value. This value should never be - // used. - // "ACTIVE" - The subnet is ready. - // "CREATING" - The subnet is being created. - // "UPDATING" - The subnet is being updated. - // "DELETING" - The subnet is being deleted. - // "RECONCILING" - Changes requested in the last operation are being - // propagated. - // "FAILED" - Last operation on the subnet did not succeed. Subnet's - // payload is reverted back to its most recent working state. + // "PEER_NETWORK_TYPE_UNSPECIFIED" - Unspecified + // "STANDARD" - Peering connection used for connecting to another VPC + // network established by the same user. For example, a peering + // connection to another VPC network in the same project or to an + // on-premises network. + // "VMWARE_ENGINE_NETWORK" - Peering connection used for connecting to + // another VMware Engine network. + // "PRIVATE_SERVICES_ACCESS" - Peering connection used for + // establishing [private services + // access](https://cloud.google.com/vpc/docs/private-services-access). + // "NETAPP_CLOUD_VOLUMES" - Peering connection used for connecting to + // NetApp Cloud Volumes. + // "THIRD_PARTY_SERVICE" - Peering connection used for connecting to + // third-party services. Most third-party services require manual setup + // of reverse peering on the VPC network associated with the third-party + // service. + // "DELL_POWERSCALE" - Peering connection used for connecting to Dell + // PowerScale Filers + PeerNetworkType string `json:"peerNetworkType,omitempty"` + + // State: Output only. State of the network peering. This field has a + // value of 'ACTIVE' when there's a matching configuration in the peer + // network. New values may be added to this enum when appropriate. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified network peering state. This is + // the default value. + // "INACTIVE" - The peering is not active. + // "ACTIVE" - The peering is active. + // "CREATING" - The peering is being created. + // "DELETING" - The peering is being deleted. State string `json:"state,omitempty"` - // Type: Output only. The type of the subnet. For example "management" - // or "userDefined". - Type string `json:"type,omitempty"` + // StateDetails: Output only. Output Only. Details about the current + // state of the network peering. + StateDetails string `json:"stateDetails,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + + // VmwareEngineNetwork: Required. The relative resource name of the + // VMware Engine network. Specify the name in the following form: + // `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_ + // engine_network_id}` where `{project}` can either be a project number + // or a project ID. + VmwareEngineNetwork string `json:"vmwareEngineNetwork,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "GatewayIp") to + // 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 @@ -2354,7 +2503,7 @@ type Subnet struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GatewayIp") to include in + // 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 @@ -2363,56 +2512,74 @@ type Subnet struct { NullFields []string `json:"-"` } -func (s *Subnet) MarshalJSON() ([]byte, error) { - type NoMethod Subnet +func (s *NetworkPeering) MarshalJSON() ([]byte, error) { + type NoMethod NetworkPeering raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TestIamPermissionsRequest: Request message for `TestIamPermissions` -// method. -type TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. - // Permissions with wildcards (such as `*` or `storage.*`) are not - // allowed. For more information see IAM Overview - // (https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` +// NetworkPolicy: Represents a network policy resource. Network policies +// are regional resources. You can use a network policy to enable or +// disable internet access and external IP access. Network policies are +// associated with a VMware Engine network, which might span across +// regions. For a given region, a network policy applies to all private +// clouds in the VMware Engine network associated with the policy. +type NetworkPolicy struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // Description: Optional. User-provided description for this network + // policy. + Description string `json:"description,omitempty"` - // NullFields is a list of field names (e.g. "Permissions") 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:"-"` -} + // EdgeServicesCidr: Required. IP address range in CIDR notation used to + // create internet access and external IP access. An RFC 1918 CIDR + // block, with a "/26" prefix, is required. The range cannot overlap + // with any prefixes either in the consumer VPC network or in use by the + // private clouds attached to that VPC network. + EdgeServicesCidr string `json:"edgeServicesCidr,omitempty"` -func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // ExternalIp: Network service that allows External IP addresses to be + // assigned to VMware workloads. This service can only be enabled when + // `internet_access` is also enabled. + ExternalIp *NetworkService `json:"externalIp,omitempty"` -// TestIamPermissionsResponse: Response message for `TestIamPermissions` -// method. -type TestIamPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that - // the caller is allowed. - Permissions []string `json:"permissions,omitempty"` + // InternetAccess: Network service that allows VMware workloads to + // access the internet. + InternetAccess *NetworkService `json:"internetAccess,omitempty"` + + // Name: Output only. The resource name of this network policy. Resource + // names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1/networkPolicies/my-network- + // policy` + Name string `json:"name,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + + // VmwareEngineNetwork: Optional. The relative resource name of the + // VMware Engine network. Specify the name in the following form: + // `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_ + // engine_network_id}` where `{project}` can either be a project number + // or a project ID. + VmwareEngineNetwork string `json:"vmwareEngineNetwork,omitempty"` + + // VmwareEngineNetworkCanonical: Output only. The canonical name of the + // VMware Engine network in the form: + // `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{ + // vmware_engine_network_id}` + VmwareEngineNetworkCanonical string `json:"vmwareEngineNetworkCanonical,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Permissions") to + // 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 @@ -2420,30 +2587,43 @@ type TestIamPermissionsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") 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. "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 *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod TestIamPermissionsResponse +func (s *NetworkPolicy) MarshalJSON() ([]byte, error) { + type NoMethod NetworkPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UndeletePrivateCloudRequest: Request message for -// VmwareEngine.UndeletePrivateCloud -type UndeletePrivateCloudRequest struct { - // RequestId: Optional. The request ID must be a valid UUID with the - // exception that zero UUID is not supported - // (00000000-0000-0000-0000-000000000000). - RequestId string `json:"requestId,omitempty"` +// NetworkService: Represents a network service that is managed by a +// `NetworkPolicy` resource. A network service provides a way to control +// an aspect of external access to VMware workloads. For example, +// whether the VMware workloads in the private clouds governed by a +// network policy can access or be accessed from the internet. +type NetworkService struct { + // Enabled: True if the service is enabled; false otherwise. + Enabled bool `json:"enabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestId") to + // State: Output only. State of the service. New values may be added to + // this enum when appropriate. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified service state. This is the + // default value. + // "UNPROVISIONED" - Service is not provisioned. + // "RECONCILING" - Service is in the process of being + // provisioned/deprovisioned. + // "ACTIVE" - Service is active. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2451,7 +2631,7 @@ type UndeletePrivateCloudRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestId") to include in + // NullFields is a list of field names (e.g. "Enabled") 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 @@ -2460,33 +2640,55 @@ type UndeletePrivateCloudRequest struct { NullFields []string `json:"-"` } -func (s *UndeletePrivateCloudRequest) MarshalJSON() ([]byte, error) { - type NoMethod UndeletePrivateCloudRequest +func (s *NetworkService) MarshalJSON() ([]byte, error) { + type NoMethod NetworkService raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Vcenter: Details about a vCenter Server management appliance. -type Vcenter struct { - // Fqdn: Fully qualified domain name of the appliance. +// Node: Node in a cluster. +type Node struct { + // CustomCoreCount: Output only. Customized number of cores + CustomCoreCount int64 `json:"customCoreCount,omitempty,string"` + + // Fqdn: Output only. Fully qualified domain name of the node. Fqdn string `json:"fqdn,omitempty"` - // InternalIp: Internal IP address of the appliance. + // InternalIp: Output only. Internal IP address of the node. InternalIp string `json:"internalIp,omitempty"` + // Name: Output only. The resource name of this node. Resource names are + // schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clu + // sters/my-cluster/nodes/my-node + Name string `json:"name,omitempty"` + + // NodeTypeId: Output only. The canonical identifier of the node type + // (corresponds to the `NodeType`). For example: standard-72. + NodeTypeId string `json:"nodeTypeId,omitempty"` + // State: Output only. The state of the appliance. // // Possible values: - // "STATE_UNSPECIFIED" - Unspecified appliance state. This is the - // default value. - // "ACTIVE" - The appliance is operational and can be used. - // "CREATING" - The appliance is being deployed. + // "STATE_UNSPECIFIED" - The default value. This value should never be + // used. + // "ACTIVE" - Node is operational and can be used by the user. + // "CREATING" - Node is being provisioned. + // "FAILED" - Node is in a failed state. + // "UPGRADING" - Node is undergoing maintenance, e.g.: during private + // cloud upgrade. State string `json:"state,omitempty"` - // Version: Version of the appliance. + // Version: Output only. The version number of the VMware ESXi + // management component in this cluster. Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fqdn") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CustomCoreCount") 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 @@ -2494,128 +2696,152 @@ type Vcenter struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fqdn") 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. "CustomCoreCount") 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 *Vcenter) MarshalJSON() ([]byte, error) { - type NoMethod Vcenter +func (s *Node) MarshalJSON() ([]byte, error) { + type NoMethod Node raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VmwareEngineNetwork: VMware Engine network resource that provides -// connectivity for VMware Engine private clouds. -type VmwareEngineNetwork struct { - // CreateTime: Output only. Creation time of this resource. - CreateTime string `json:"createTime,omitempty"` +// NodeType: Describes node type. +type NodeType struct { + // AvailableCustomCoreCounts: Output only. List of possible values of + // custom core count. + AvailableCustomCoreCounts []int64 `json:"availableCustomCoreCounts,omitempty"` - // Description: User-provided description for this VMware Engine - // network. - Description string `json:"description,omitempty"` + // Capabilities: Output only. Capabilities of this node type. + // + // Possible values: + // "CAPABILITY_UNSPECIFIED" - The default value. This value is used if + // the capability is omitted or unknown. + // "STRETCHED_CLUSTERS" - This node type supports stretch clusters. + Capabilities []string `json:"capabilities,omitempty"` - // Etag: Checksum that may be sent on update and delete requests to - // ensure that the user-provided value is up to date before the server - // processes a request. The server computes checksums based on the value - // of other fields in the request. - Etag string `json:"etag,omitempty"` + // DiskSizeGb: Output only. The amount of storage available, defined in + // GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty"` - // Name: Output only. The resource name of the VMware Engine network. - // Resource names are schemeless URIs that follow the conventions in - // https://cloud.google.com/apis/design/resource_names. For example: - // `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - Name string `json:"name,omitempty"` + // DisplayName: Output only. The friendly name for this node type. For + // example: ve1-standard-72 + DisplayName string `json:"displayName,omitempty"` - // State: Output only. State of the VMware Engine network. - // - // Possible values: - // "STATE_UNSPECIFIED" - The default value. This value is used if the - // state is omitted. - // "CREATING" - The VMware Engine network is being created. - // "ACTIVE" - The VMware Engine network is ready. - // "UPDATING" - The VMware Engine network is being updated. - // "DELETING" - The VMware Engine network is being deleted. - State string `json:"state,omitempty"` + // MemoryGb: Output only. The amount of physical memory available, + // defined in GB. + MemoryGb int64 `json:"memoryGb,omitempty"` - // Type: Required. VMware Engine network type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - The default value. This value should never be - // used. - // "LEGACY" - Network type used by private clouds created in projects - // without a network of type `STANDARD`. This network type is no longer - // used for new VMware Engine private cloud deployments. - Type string `json:"type,omitempty"` + // Name: Output only. The resource name of this node type. Resource + // names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + Name string `json:"name,omitempty"` - // Uid: Output only. System-generated unique identifier for the - // resource. - Uid string `json:"uid,omitempty"` + // NodeTypeId: Output only. The canonical identifier of the node type + // (corresponds to the `NodeType`). For example: standard-72. + NodeTypeId string `json:"nodeTypeId,omitempty"` - // UpdateTime: Output only. Last update time of this resource. - UpdateTime string `json:"updateTime,omitempty"` + // TotalCoreCount: Output only. The total number of CPU cores in a + // single node. + TotalCoreCount int64 `json:"totalCoreCount,omitempty"` - // VpcNetworks: Output only. VMware Engine service VPC networks that - // provide connectivity from a private cloud to customer projects, the - // internet, and other Google Cloud services. - VpcNetworks []*VpcNetwork `json:"vpcNetworks,omitempty"` + // VirtualCpuCount: Output only. The total number of virtual CPUs in a + // single node. + VirtualCpuCount int64 `json:"virtualCpuCount,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 is a list of field names (e.g. + // "AvailableCustomCoreCounts") 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 is a list of field names (e.g. + // "AvailableCustomCoreCounts") 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 *VmwareEngineNetwork) MarshalJSON() ([]byte, error) { - type NoMethod VmwareEngineNetwork +func (s *NodeType) MarshalJSON() ([]byte, error) { + type NoMethod NodeType raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpcNetwork: Represents a VMware Engine VPC network that is managed by -// a VMware Engine network resource. -type VpcNetwork struct { - // Network: Output only. The relative resource name of the service VPC - // network this VMware Engine network is attached to. For example: - // `projects/123123/global/networks/my-network` - Network string `json:"network,omitempty"` - - // Type: Output only. Type of VPC network (INTRANET, INTERNET, or - // GOOGLE_CLOUD) +// NodeTypeConfig: Information about the type and number of nodes +// associated with the cluster. +type NodeTypeConfig struct { + // CustomCoreCount: Optional. Customized number of cores available to + // each node of the type. This number must always be one of + // `nodeType.availableCustomCoreCounts`. If zero is provided max value + // from `nodeType.availableCustomCoreCounts` will be used. + CustomCoreCount int64 `json:"customCoreCount,omitempty"` + + // NodeCount: Required. The number of nodes of this type in the cluster + NodeCount int64 `json:"nodeCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomCoreCount") 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. "CustomCoreCount") 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 *NodeTypeConfig) MarshalJSON() ([]byte, error) { + type NoMethod NodeTypeConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Nsx: Details about a NSX Manager appliance. +type Nsx struct { + // Fqdn: Fully qualified domain name of the appliance. + Fqdn string `json:"fqdn,omitempty"` + + // InternalIp: Internal IP address of the appliance. + InternalIp string `json:"internalIp,omitempty"` + + // State: Output only. The state of the appliance. // // Possible values: - // "TYPE_UNSPECIFIED" - The default value. This value should never be - // used. - // "INTRANET" - VPC network that will be peered with a consumer VPC - // network or the intranet VPC of another VMware Engine network. Access - // a private cloud through Compute Engine VMs on a peered VPC network or - // an on-premises resource connected to a peered consumer VPC network. - // "INTERNET" - VPC network used for internet access to and from a - // private cloud. - // "GOOGLE_CLOUD" - VPC network used for access to Google Cloud - // services like Cloud Storage. - Type string `json:"type,omitempty"` + // "STATE_UNSPECIFIED" - Unspecified appliance state. This is the + // default value. + // "ACTIVE" - The appliance is operational and can be used. + // "CREATING" - The appliance is being deployed. + State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Network") to + // Version: Version of the appliance. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fqdn") 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 @@ -2623,7 +2849,121 @@ type VpcNetwork struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Network") to include in + // NullFields is a list of field names (e.g. "Fqdn") 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 *Nsx) MarshalJSON() ([]byte, error) { + type NoMethod Nsx + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// 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) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. True if the user has requested + // cancellation of the operation; false otherwise. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2632,101 +2972,7366 @@ type VpcNetwork struct { NullFields []string `json:"-"` } -func (s *VpcNetwork) MarshalJSON() ([]byte, error) { - type NoMethod VpcNetwork +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "vmwareengine.projects.locations.get": +// PeeringRoute: Exchanged network peering route. +type PeeringRoute struct { + // DestRange: Output only. Destination range of the peering route in + // CIDR notation. + DestRange string `json:"destRange,omitempty"` -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header + // Direction: Output only. Direction of the routes exchanged with the + // peer network, from the VMware Engine network perspective: * Routes of + // direction `INCOMING` are imported from the peer network. * Routes of + // direction `OUTGOING` are exported from the intranet VPC network of + // the VMware Engine network. + // + // Possible values: + // "DIRECTION_UNSPECIFIED" - Unspecified exchanged routes direction. + // This is default. + // "INCOMING" - Routes imported from the peer network. + // "OUTGOING" - Routes exported to the peer network. + Direction string `json:"direction,omitempty"` + + // Imported: Output only. True if the peering route has been imported + // from a peered VPC network; false otherwise. The import happens if the + // field `NetworkPeering.importCustomRoutes` is true for this network, + // `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, + // and the import does not result in a route conflict. + Imported bool `json:"imported,omitempty"` + + // NextHopRegion: Output only. Region containing the next hop of the + // peering route. This field only applies to dynamic routes in the peer + // VPC network. + NextHopRegion string `json:"nextHopRegion,omitempty"` + + // Priority: Output only. The priority of the peering route. + Priority int64 `json:"priority,omitempty,string"` + + // Type: Output only. Type of the route in the peer VPC network. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified peering route type. This is the + // default value. + // "DYNAMIC_PEERING_ROUTE" - Dynamic routes in the peer network. + // "STATIC_PEERING_ROUTE" - Static routes in the peer network. + // "SUBNET_PEERING_ROUTE" - Created, updated, and removed + // automatically by Google Cloud when subnets are created, modified, or + // deleted in the peer network. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestRange") 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. "DestRange") 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 *PeeringRoute) MarshalJSON() ([]byte, error) { + type NoMethod PeeringRoute + 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 +// 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 < 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 < +// 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/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") 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. "AuditConfigs") 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 *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Principal: Users/Service accounts which have access for DNS binding +// on the intranet VPC corresponding to the consumer project. +type Principal struct { + // ServiceAccount: The service account which needs to be granted the + // permission. + ServiceAccount string `json:"serviceAccount,omitempty"` + + // User: The user who needs to be granted permission. + User string `json:"user,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ServiceAccount") 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. "ServiceAccount") 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 *Principal) MarshalJSON() ([]byte, error) { + type NoMethod Principal + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrivateCloud: Represents a private cloud resource. Private clouds of +// type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` +// private clouds are regional. +type PrivateCloud struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` + + // DeleteTime: Output only. Time when the resource was scheduled for + // deletion. + DeleteTime string `json:"deleteTime,omitempty"` + + // Description: User-provided description for this private cloud. + Description string `json:"description,omitempty"` + + // ExpireTime: Output only. Time when the resource will be irreversibly + // deleted. + ExpireTime string `json:"expireTime,omitempty"` + + // Hcx: Output only. HCX appliance. + Hcx *Hcx `json:"hcx,omitempty"` + + // ManagementCluster: Required. Input only. The management cluster for + // this private cloud. This field is required during creation of the + // private cloud to provide details for the default cluster. The + // following fields can't be changed after private cloud creation: + // `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. + ManagementCluster *ManagementCluster `json:"managementCluster,omitempty"` + + // Name: Output only. The resource name of this private cloud. Resource + // names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + Name string `json:"name,omitempty"` + + // NetworkConfig: Required. Network configuration of the private cloud. + NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` + + // Nsx: Output only. NSX appliance. + Nsx *Nsx `json:"nsx,omitempty"` + + // State: Output only. State of the resource. New values may be added to + // this enum when appropriate. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value should never be + // used. + // "ACTIVE" - The private cloud is ready. + // "CREATING" - The private cloud is being created. + // "UPDATING" - The private cloud is being updated. + // "FAILED" - The private cloud is in failed state. + // "DELETED" - The private cloud is scheduled for deletion. The + // deletion process can be cancelled by using the corresponding undelete + // method. + // "PURGING" - The private cloud is irreversibly deleted and is being + // removed from the system. + State string `json:"state,omitempty"` + + // Type: Optional. Type of the private cloud. Defaults to STANDARD. + // + // Possible values: + // "STANDARD" - Standard private is a zonal resource, with 3+ nodes. + // Default type. + // "TIME_LIMITED" - Time limited private cloud is a zonal resource, + // can have only 1 node and has limited life span. Will be deleted after + // defined period of time, can be converted into standard private cloud + // by expanding it up to 3 or more nodes. + // "STRETCHED" - Stretched private cloud is a regional resource with + // redundancy, with a minimum of 6 nodes, nodes count has to be even. + Type string `json:"type,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + + // Vcenter: Output only. Vcenter appliance. + Vcenter *Vcenter `json:"vcenter,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 *PrivateCloud) MarshalJSON() ([]byte, error) { + type NoMethod PrivateCloud + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrivateConnection: Private connection resource that provides +// connectivity for VMware Engine private clouds. +type PrivateConnection struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. User-provided description for this private + // connection. + Description string `json:"description,omitempty"` + + // Name: Output only. The resource name of the private connection. + // Resource names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1/privateConnections/my-conne + // ction` + Name string `json:"name,omitempty"` + + // PeeringId: Output only. VPC network peering id between given network + // VPC and VMwareEngineNetwork. + PeeringId string `json:"peeringId,omitempty"` + + // PeeringState: Output only. Peering state between service network and + // VMware Engine network. + // + // Possible values: + // "PEERING_STATE_UNSPECIFIED" - The default value. This value is used + // if the peering state is omitted or unknown. + // "PEERING_ACTIVE" - The peering is in active state. + // "PEERING_INACTIVE" - The peering is in inactive state. + PeeringState string `json:"peeringState,omitempty"` + + // RoutingMode: Optional. Routing Mode. Default value is set to GLOBAL. + // For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or + // REGIONAL, for other types only GLOBAL is supported. + // + // Possible values: + // "ROUTING_MODE_UNSPECIFIED" - The default value. This value should + // never be used. + // "GLOBAL" - Global Routing Mode + // "REGIONAL" - Regional Routing Mode + RoutingMode string `json:"routingMode,omitempty"` + + // ServiceNetwork: Required. Service network to create private + // connection. Specify the name in the following form: + // `projects/{project}/global/networks/{network_id}` For type = + // PRIVATE_SERVICE_ACCESS, this field represents servicenetworking VPC, + // e.g. projects/project-tp/global/networks/servicenetworking. For type + // = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, e.g. + // projects/project-tp/global/networks/netapp-tenant-vpc. For type = + // DELL_POWERSCALE, this field represent Dell service VPC, e.g. + // projects/project-tp/global/networks/dell-tenant-vpc. For type= + // THIRD_PARTY_SERVICE, this field could represent a consumer VPC or any + // other producer VPC to which the VMware Engine Network needs to be + // connected, e.g. projects/project/global/networks/vpc. + ServiceNetwork string `json:"serviceNetwork,omitempty"` + + // State: Output only. State of the private connection. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "CREATING" - The private connection is being created. + // "ACTIVE" - The private connection is ready. + // "UPDATING" - The private connection is being updated. + // "DELETING" - The private connection is being deleted. + // "UNPROVISIONED" - The private connection is not provisioned, since + // no private cloud is present for which this private connection is + // needed. + // "FAILED" - The private connection is in failed state. + State string `json:"state,omitempty"` + + // Type: Required. Private connection type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The default value. This value should never be + // used. + // "PRIVATE_SERVICE_ACCESS" - Connection used for establishing + // [private services + // access](https://cloud.google.com/vpc/docs/private-services-access). + // "NETAPP_CLOUD_VOLUMES" - Connection used for connecting to NetApp + // Cloud Volumes. + // "DELL_POWERSCALE" - Connection used for connecting to Dell + // PowerScale. + // "THIRD_PARTY_SERVICE" - Connection used for connecting to + // third-party services. + Type string `json:"type,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + + // VmwareEngineNetwork: Required. The relative resource name of Legacy + // VMware Engine network. Specify the name in the following form: + // `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_ + // engine_network_id}` where `{project}`, `{location}` will be same as + // specified in private connection resource name and + // `{vmware_engine_network_id}` will be in the form of + // `{location}`-default e.g. + // projects/project/locations/us-central1/vmwareEngineNetworks/us-central + // 1-default. + VmwareEngineNetwork string `json:"vmwareEngineNetwork,omitempty"` + + // VmwareEngineNetworkCanonical: Output only. The canonical name of the + // VMware Engine network in the form: + // `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{ + // vmware_engine_network_id}` + VmwareEngineNetworkCanonical string `json:"vmwareEngineNetworkCanonical,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 *PrivateConnection) MarshalJSON() ([]byte, error) { + type NoMethod PrivateConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RepairManagementDnsZoneBindingRequest: Request message for +// VmwareEngine.RepairManagementDnsZoneBindings +type RepairManagementDnsZoneBindingRequest struct { + // RequestId: Optional. A request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server + // will know to ignore the request if it has already been completed. The + // server guarantees that a request doesn't result in creation of + // duplicate commitments for at least 60 minutes. For example, consider + // a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the + // server can check if the original operation with the same request ID + // was received, and if so, will ignore the second request. This + // prevents clients from accidentally creating duplicate commitments. + // The request ID must be a valid UUID with the exception that zero UUID + // is not supported (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") 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. "RequestId") 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 *RepairManagementDnsZoneBindingRequest) MarshalJSON() ([]byte, error) { + type NoMethod RepairManagementDnsZoneBindingRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResetNsxCredentialsRequest: Request message for +// VmwareEngine.ResetNsxCredentials +type ResetNsxCredentialsRequest struct { + // RequestId: Optional. A request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server + // will know to ignore the request if it has already been completed. The + // server guarantees that a request doesn't result in creation of + // duplicate commitments for at least 60 minutes. For example, consider + // a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the + // server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. The request + // ID must be a valid UUID with the exception that zero UUID is not + // supported (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") 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. "RequestId") 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 *ResetNsxCredentialsRequest) MarshalJSON() ([]byte, error) { + type NoMethod ResetNsxCredentialsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResetVcenterCredentialsRequest: Request message for +// VmwareEngine.ResetVcenterCredentials +type ResetVcenterCredentialsRequest struct { + // RequestId: Optional. A request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server + // will know to ignore the request if it has already been completed. The + // server guarantees that a request doesn't result in creation of + // duplicate commitments for at least 60 minutes. For example, consider + // a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the + // server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. The request + // ID must be a valid UUID with the exception that zero UUID is not + // supported (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // Username: Optional. The username of the user to be to reset the + // credentials. The default value of this field is CloudOwner@gve.local. + // The provided value should be one of the following: + // solution-user-01@gve.local, solution-user-02@gve.local, + // solution-user-03@gve.local, solution-user-04@gve.local, + // solution-user-05@gve.local, zertoadmin@gve.local. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") 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. "RequestId") 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 *ResetVcenterCredentialsRequest) MarshalJSON() ([]byte, error) { + type NoMethod ResetVcenterCredentialsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RevokeDnsBindPermissionRequest: Request message for +// VmwareEngine.RevokeDnsBindPermission +type RevokeDnsBindPermissionRequest struct { + // Principal: Required. The consumer provided user/service account which + // needs to be granted permission to bind with the intranet VPC + // corresponding to the consumer project. + Principal *Principal `json:"principal,omitempty"` + + // RequestId: Optional. A request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server + // will know to ignore the request if it has already been completed. The + // server guarantees that a request doesn't result in creation of + // duplicate commitments for at least 60 minutes. For example, consider + // a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the + // server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. The request + // ID must be a valid UUID with the exception that zero UUID is not + // supported (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Principal") 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. "Principal") 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 *RevokeDnsBindPermissionRequest) MarshalJSON() ([]byte, error) { + type NoMethod RevokeDnsBindPermissionRequest + 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 + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") 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. "Policy") 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 *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `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) +} + +// StretchedClusterConfig: Configuration of a stretched cluster. +type StretchedClusterConfig struct { + // PreferredLocation: Required. Zone that will remain operational when + // connection between the two zones is lost. Specify the resource name + // of a zone that belongs to the region of the private cloud. For + // example: `projects/{project}/locations/europe-west3-a` where + // `{project}` can either be a project number or a project ID. + PreferredLocation string `json:"preferredLocation,omitempty"` + + // SecondaryLocation: Required. Additional zone for a higher level of + // availability and load balancing. Specify the resource name of a zone + // that belongs to the region of the private cloud. For example: + // `projects/{project}/locations/europe-west3-b` where `{project}` can + // either be a project number or a project ID. + SecondaryLocation string `json:"secondaryLocation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PreferredLocation") + // 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. "PreferredLocation") 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 *StretchedClusterConfig) MarshalJSON() ([]byte, error) { + type NoMethod StretchedClusterConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Subnet: Subnet in a private cloud. Either `management` subnets (such +// as vMotion) that are read-only, or `userDefined`, which can also be +// updated. +type Subnet struct { + // GatewayIp: The IP address of the gateway of this subnet. Must fall + // within the IP prefix defined above. + GatewayIp string `json:"gatewayIp,omitempty"` + + // IpCidrRange: The IP address range of the subnet in CIDR format + // '10.0.0.0/24'. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // Name: Output only. The resource name of this subnet. Resource names + // are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/su + // bnets/my-subnet` + Name string `json:"name,omitempty"` + + // State: Output only. The state of the resource. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value should never be + // used. + // "ACTIVE" - The subnet is ready. + // "CREATING" - The subnet is being created. + // "UPDATING" - The subnet is being updated. + // "DELETING" - The subnet is being deleted. + // "RECONCILING" - Changes requested in the last operation are being + // propagated. + // "FAILED" - Last operation on the subnet did not succeed. Subnet's + // payload is reverted back to its most recent working state. + State string `json:"state,omitempty"` + + // Type: Output only. The type of the subnet. For example "management" + // or "userDefined". + Type string `json:"type,omitempty"` + + // VlanId: Output only. VLAN ID of the VLAN on which the subnet is + // configured + VlanId int64 `json:"vlanId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "GatewayIp") 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. "GatewayIp") 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 *Subnet) MarshalJSON() ([]byte, error) { + type NoMethod Subnet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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 *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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 *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UndeletePrivateCloudRequest: Request message for +// VmwareEngine.UndeletePrivateCloud +type UndeletePrivateCloudRequest struct { + // RequestId: Optional. The request ID must be a valid UUID with the + // exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") 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. "RequestId") 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 *UndeletePrivateCloudRequest) MarshalJSON() ([]byte, error) { + type NoMethod UndeletePrivateCloudRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Vcenter: Details about a vCenter Server management appliance. +type Vcenter struct { + // Fqdn: Fully qualified domain name of the appliance. + Fqdn string `json:"fqdn,omitempty"` + + // InternalIp: Internal IP address of the appliance. + InternalIp string `json:"internalIp,omitempty"` + + // State: Output only. The state of the appliance. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified appliance state. This is the + // default value. + // "ACTIVE" - The appliance is operational and can be used. + // "CREATING" - The appliance is being deployed. + State string `json:"state,omitempty"` + + // Version: Version of the appliance. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fqdn") 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. "Fqdn") 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 *Vcenter) MarshalJSON() ([]byte, error) { + type NoMethod Vcenter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VmwareEngineNetwork: VMware Engine network resource that provides +// connectivity for VMware Engine private clouds. +type VmwareEngineNetwork struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` + + // Description: User-provided description for this VMware Engine + // network. + Description string `json:"description,omitempty"` + + // Etag: Checksum that may be sent on update and delete requests to + // ensure that the user-provided value is up to date before the server + // processes a request. The server computes checksums based on the value + // of other fields in the request. + Etag string `json:"etag,omitempty"` + + // Name: Output only. The resource name of the VMware Engine network. + // Resource names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + Name string `json:"name,omitempty"` + + // State: Output only. State of the VMware Engine network. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "CREATING" - The VMware Engine network is being created. + // "ACTIVE" - The VMware Engine network is ready. + // "UPDATING" - The VMware Engine network is being updated. + // "DELETING" - The VMware Engine network is being deleted. + State string `json:"state,omitempty"` + + // Type: Required. VMware Engine network type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The default value. This value should never be + // used. + // "LEGACY" - Network type used by private clouds created in projects + // without a network of type `STANDARD`. This network type is no longer + // used for new VMware Engine private cloud deployments. + // "STANDARD" - Standard network type used for private cloud + // connectivity. + Type string `json:"type,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + + // VpcNetworks: Output only. VMware Engine service VPC networks that + // provide connectivity from a private cloud to customer projects, the + // internet, and other Google Cloud services. + VpcNetworks []*VpcNetwork `json:"vpcNetworks,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 *VmwareEngineNetwork) MarshalJSON() ([]byte, error) { + type NoMethod VmwareEngineNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpcNetwork: Represents a VMware Engine VPC network that is managed by +// a VMware Engine network resource. +type VpcNetwork struct { + // Network: Output only. The relative resource name of the service VPC + // network this VMware Engine network is attached to. For example: + // `projects/123123/global/networks/my-network` + Network string `json:"network,omitempty"` + + // Type: Output only. Type of VPC network (INTRANET, INTERNET, or + // GOOGLE_CLOUD) + // + // Possible values: + // "TYPE_UNSPECIFIED" - The default value. This value should never be + // used. + // "INTRANET" - VPC network that will be peered with a consumer VPC + // network or the intranet VPC of another VMware Engine network. Access + // a private cloud through Compute Engine VMs on a peered VPC network or + // an on-premises resource connected to a peered consumer VPC network. + // "INTERNET" - VPC network used for internet access to and from a + // private cloud. + // "GOOGLE_CLOUD" - VPC network used for access to Google Cloud + // services like Cloud Storage. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") 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. "Network") 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 *VpcNetwork) MarshalJSON() ([]byte, error) { + type NoMethod VpcNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "vmwareengine.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } // Get: Gets information about a location. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) 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 "vmwareengine.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, 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 := &Location{ + 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 information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) 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}/locations") + 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 "vmwareengine.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, 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 := &ListLocationsResponse{ + 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 information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) 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 "vmwareengine.projects.locations.global.getDnsBindPermission": + +type ProjectsLocationsGlobalGetDnsBindPermissionCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetDnsBindPermission: Gets all the principals having bind permission +// on the intranet VPC associated with the consumer project granted by +// the Grant API. +// +// - name: The name of the resource which stores the users/service +// accounts having the permission to bind to the corresponding +// intranet VPC of the consumer project. DnsBindPermission is a global +// resource. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/global/dnsBindPermission`. +func (r *ProjectsLocationsGlobalService) GetDnsBindPermission(name string) *ProjectsLocationsGlobalGetDnsBindPermissionCall { + c := &ProjectsLocationsGlobalGetDnsBindPermissionCall{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 *ProjectsLocationsGlobalGetDnsBindPermissionCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalGetDnsBindPermissionCall { + 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 *ProjectsLocationsGlobalGetDnsBindPermissionCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalGetDnsBindPermissionCall { + 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 *ProjectsLocationsGlobalGetDnsBindPermissionCall) Context(ctx context.Context) *ProjectsLocationsGlobalGetDnsBindPermissionCall { + 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 *ProjectsLocationsGlobalGetDnsBindPermissionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalGetDnsBindPermissionCall) 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 "vmwareengine.projects.locations.global.getDnsBindPermission" call. +// Exactly one of *DnsBindPermission or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DnsBindPermission.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 *ProjectsLocationsGlobalGetDnsBindPermissionCall) Do(opts ...googleapi.CallOption) (*DnsBindPermission, 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 := &DnsBindPermission{ + 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 all the principals having bind permission on the intranet VPC associated with the consumer project granted by the Grant API.", + // "flatPath": "v1/projects/{projectsId}/locations/global/dnsBindPermission", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.global.getDnsBindPermission", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource which stores the users/service accounts having the permission to bind to the corresponding intranet VPC of the consumer project. DnsBindPermission is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/dnsBindPermission`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/dnsBindPermission$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "DnsBindPermission" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.global.dnsBindPermission.grant": + +type ProjectsLocationsGlobalDnsBindPermissionGrantCall struct { + s *Service + name string + grantdnsbindpermissionrequest *GrantDnsBindPermissionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Grant: Grants the bind permission to the customer provided +// principal(user / service account) to bind their DNS zone with the +// intranet VPC associated with the project. +// +// - name: The name of the resource which stores the users/service +// accounts having the permission to bind to the corresponding +// intranet VPC of the consumer project. DnsBindPermission is a global +// resource. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/global/dnsBindPermission`. +func (r *ProjectsLocationsGlobalDnsBindPermissionService) Grant(name string, grantdnsbindpermissionrequest *GrantDnsBindPermissionRequest) *ProjectsLocationsGlobalDnsBindPermissionGrantCall { + c := &ProjectsLocationsGlobalDnsBindPermissionGrantCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.grantdnsbindpermissionrequest = grantdnsbindpermissionrequest + 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 *ProjectsLocationsGlobalDnsBindPermissionGrantCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDnsBindPermissionGrantCall { + 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 *ProjectsLocationsGlobalDnsBindPermissionGrantCall) Context(ctx context.Context) *ProjectsLocationsGlobalDnsBindPermissionGrantCall { + 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 *ProjectsLocationsGlobalDnsBindPermissionGrantCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDnsBindPermissionGrantCall) 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.grantdnsbindpermissionrequest) + 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}:grant") + 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 "vmwareengine.projects.locations.global.dnsBindPermission.grant" 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 *ProjectsLocationsGlobalDnsBindPermissionGrantCall) 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": "Grants the bind permission to the customer provided principal(user / service account) to bind their DNS zone with the intranet VPC associated with the project.", + // "flatPath": "v1/projects/{projectsId}/locations/global/dnsBindPermission:grant", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.global.dnsBindPermission.grant", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource which stores the users/service accounts having the permission to bind to the corresponding intranet VPC of the consumer project. DnsBindPermission is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/dnsBindPermission`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/dnsBindPermission$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:grant", + // "request": { + // "$ref": "GrantDnsBindPermissionRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.global.dnsBindPermission.revoke": + +type ProjectsLocationsGlobalDnsBindPermissionRevokeCall struct { + s *Service + name string + revokednsbindpermissionrequest *RevokeDnsBindPermissionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Revoke: Revokes the bind permission from the customer provided +// principal(user / service account) on the intranet VPC associated with +// the consumer project. +// +// - name: The name of the resource which stores the users/service +// accounts having the permission to bind to the corresponding +// intranet VPC of the consumer project. DnsBindPermission is a global +// resource. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/global/dnsBindPermission`. +func (r *ProjectsLocationsGlobalDnsBindPermissionService) Revoke(name string, revokednsbindpermissionrequest *RevokeDnsBindPermissionRequest) *ProjectsLocationsGlobalDnsBindPermissionRevokeCall { + c := &ProjectsLocationsGlobalDnsBindPermissionRevokeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.revokednsbindpermissionrequest = revokednsbindpermissionrequest + 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 *ProjectsLocationsGlobalDnsBindPermissionRevokeCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDnsBindPermissionRevokeCall { + 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 *ProjectsLocationsGlobalDnsBindPermissionRevokeCall) Context(ctx context.Context) *ProjectsLocationsGlobalDnsBindPermissionRevokeCall { + 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 *ProjectsLocationsGlobalDnsBindPermissionRevokeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDnsBindPermissionRevokeCall) 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.revokednsbindpermissionrequest) + 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}:revoke") + 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 "vmwareengine.projects.locations.global.dnsBindPermission.revoke" 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 *ProjectsLocationsGlobalDnsBindPermissionRevokeCall) 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": "Revokes the bind permission from the customer provided principal(user / service account) on the intranet VPC associated with the consumer project.", + // "flatPath": "v1/projects/{projectsId}/locations/global/dnsBindPermission:revoke", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.global.dnsBindPermission.revoke", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the resource which stores the users/service accounts having the permission to bind to the corresponding intranet VPC of the consumer project. DnsBindPermission is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/dnsBindPermission`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/dnsBindPermission$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:revoke", + // "request": { + // "$ref": "RevokeDnsBindPermissionRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.global.networkPeerings.create": + +type ProjectsLocationsGlobalNetworkPeeringsCreateCall struct { + s *Service + parent string + networkpeering *NetworkPeering + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new network peering between the peer network and +// VMware Engine network provided in a `NetworkPeering` resource. +// +// - parent: The resource name of the location to create the new network +// peering in. This value is always `global`, because `NetworkPeering` +// is a global resource. Resource names are schemeless URIs that +// follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/global`. +func (r *ProjectsLocationsGlobalNetworkPeeringsService) Create(parent string, networkpeering *NetworkPeering) *ProjectsLocationsGlobalNetworkPeeringsCreateCall { + c := &ProjectsLocationsGlobalNetworkPeeringsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.networkpeering = networkpeering + return c +} + +// NetworkPeeringId sets the optional parameter "networkPeeringId": +// Required. The user-provided identifier of the new `NetworkPeering`. +// This identifier must be unique among `NetworkPeering` resources +// within the parent and becomes the final token in the name URI. The +// identifier must meet the following requirements: * Only contains 1-63 +// alphanumeric characters and hyphens * Begins with an alphabetical +// character * Ends with a non-hyphen character * Not formatted as a +// UUID * Complies with RFC 1034 +// (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsGlobalNetworkPeeringsCreateCall) NetworkPeeringId(networkPeeringId string) *ProjectsLocationsGlobalNetworkPeeringsCreateCall { + c.urlParams_.Set("networkPeeringId", networkPeeringId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsGlobalNetworkPeeringsCreateCall) RequestId(requestId string) *ProjectsLocationsGlobalNetworkPeeringsCreateCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsGlobalNetworkPeeringsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalNetworkPeeringsCreateCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalNetworkPeeringsCreateCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalNetworkPeeringsCreateCall) 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.networkpeering) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/networkPeerings") + 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 "vmwareengine.projects.locations.global.networkPeerings.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 *ProjectsLocationsGlobalNetworkPeeringsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new network peering between the peer network and VMware Engine network provided in a `NetworkPeering` resource.", + // "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.global.networkPeerings.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "networkPeeringId": { + // "description": "Required. The user-provided identifier of the new `NetworkPeering`. This identifier must be unique among `NetworkPeering` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the location to create the new network peering in. This value is always `global`, because `NetworkPeering` is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/networkPeerings", + // "request": { + // "$ref": "NetworkPeering" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.global.networkPeerings.delete": + +type ProjectsLocationsGlobalNetworkPeeringsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a `NetworkPeering` resource. When a network peering +// is deleted for a VMware Engine network, the peer network becomes +// inaccessible to that VMware Engine network. +// +// - name: The resource name of the network peering to be deleted. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/global/networkPeerings/my-peering`. +func (r *ProjectsLocationsGlobalNetworkPeeringsService) Delete(name string) *ProjectsLocationsGlobalNetworkPeeringsDeleteCall { + c := &ProjectsLocationsGlobalNetworkPeeringsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsGlobalNetworkPeeringsDeleteCall) RequestId(requestId string) *ProjectsLocationsGlobalNetworkPeeringsDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsGlobalNetworkPeeringsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalNetworkPeeringsDeleteCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalNetworkPeeringsDeleteCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalNetworkPeeringsDeleteCall) 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 "vmwareengine.projects.locations.global.networkPeerings.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalNetworkPeeringsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a `NetworkPeering` resource. When a network peering is deleted for a VMware Engine network, the peer network becomes inaccessible to that VMware Engine network.", + // "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings/{networkPeeringsId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.global.networkPeerings.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the network peering to be deleted. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/networkPeerings/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.global.networkPeerings.get": + +type ProjectsLocationsGlobalNetworkPeeringsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a `NetworkPeering` resource by its resource name. The +// resource contains details of the network peering, such as peered +// networks, import and export custom route configurations, and peering +// state. +// +// - name: The resource name of the network peering to retrieve. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/global/networkPeerings/my-peering`. +func (r *ProjectsLocationsGlobalNetworkPeeringsService) Get(name string) *ProjectsLocationsGlobalNetworkPeeringsGetCall { + c := &ProjectsLocationsGlobalNetworkPeeringsGetCall{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 *ProjectsLocationsGlobalNetworkPeeringsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalNetworkPeeringsGetCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalNetworkPeeringsGetCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalNetworkPeeringsGetCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalNetworkPeeringsGetCall) 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 "vmwareengine.projects.locations.global.networkPeerings.get" call. +// Exactly one of *NetworkPeering or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *NetworkPeering.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 *ProjectsLocationsGlobalNetworkPeeringsGetCall) Do(opts ...googleapi.CallOption) (*NetworkPeering, 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 := &NetworkPeering{ + 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 `NetworkPeering` resource by its resource name. The resource contains details of the network peering, such as peered networks, import and export custom route configurations, and peering state.", + // "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings/{networkPeeringsId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.global.networkPeerings.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the network peering to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/networkPeerings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "NetworkPeering" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.global.networkPeerings.list": + +type ProjectsLocationsGlobalNetworkPeeringsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `NetworkPeering` resources in a given project. +// +// - parent: The resource name of the location (global) to query for +// network peerings. Resource names are schemeless URIs that follow +// the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/global`. +func (r *ProjectsLocationsGlobalNetworkPeeringsService) List(parent string) *ProjectsLocationsGlobalNetworkPeeringsListCall { + c := &ProjectsLocationsGlobalNetworkPeeringsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of network peerings, you can +// exclude the ones named `example-peering` by specifying `name != +// "example-peering". To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` (name = +// "example-peering") (createTime > "2021-04-12T08:15:10.40Z") ``` By +// default, each expression is an `AND` expression. However, you can +// include `AND` and `OR` expressions explicitly. For example: ``` (name +// = "example-peering-1") AND (createTime > "2021-04-12T08:15:10.40Z") +// OR (name = "example-peering-2") ``` +func (c *ProjectsLocationsGlobalNetworkPeeringsListCall) Filter(filter string) *ProjectsLocationsGlobalNetworkPeeringsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsGlobalNetworkPeeringsListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalNetworkPeeringsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of network peerings to return in one page. The maximum value is +// coerced to 1000. The default value of this field is 500. +func (c *ProjectsLocationsGlobalNetworkPeeringsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalNetworkPeeringsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListNetworkPeerings` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListNetworkPeerings` must match the call that provided +// the page token. +func (c *ProjectsLocationsGlobalNetworkPeeringsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalNetworkPeeringsListCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalNetworkPeeringsListCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalNetworkPeeringsListCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalNetworkPeeringsListCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalNetworkPeeringsListCall) 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}/networkPeerings") + 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 "vmwareengine.projects.locations.global.networkPeerings.list" call. +// Exactly one of *ListNetworkPeeringsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListNetworkPeeringsResponse.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 *ProjectsLocationsGlobalNetworkPeeringsListCall) Do(opts ...googleapi.CallOption) (*ListNetworkPeeringsResponse, 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 := &ListNetworkPeeringsResponse{ + 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 `NetworkPeering` resources in a given project.", + // "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.global.networkPeerings.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of network peerings, you can exclude the ones named `example-peering` by specifying `name != \"example-peering\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-peering\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-peering-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-peering-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of network peerings to return in one page. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListNetworkPeerings` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNetworkPeerings` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the location (global) to query for network peerings. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/networkPeerings", + // "response": { + // "$ref": "ListNetworkPeeringsResponse" + // }, + // "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 *ProjectsLocationsGlobalNetworkPeeringsListCall) Pages(ctx context.Context, f func(*ListNetworkPeeringsResponse) 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 "vmwareengine.projects.locations.global.networkPeerings.patch": + +type ProjectsLocationsGlobalNetworkPeeringsPatchCall struct { + s *Service + name string + networkpeering *NetworkPeering + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Modifies a `NetworkPeering` resource. Only the `description` +// field can be updated. Only fields specified in `updateMask` are +// applied. +// +// - name: Output only. The resource name of the network peering. +// Resource names are scheme-less URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/global/networkPeerings/my-peering`. +func (r *ProjectsLocationsGlobalNetworkPeeringsService) Patch(name string, networkpeering *NetworkPeering) *ProjectsLocationsGlobalNetworkPeeringsPatchCall { + c := &ProjectsLocationsGlobalNetworkPeeringsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.networkpeering = networkpeering + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsGlobalNetworkPeeringsPatchCall) RequestId(requestId string) *ProjectsLocationsGlobalNetworkPeeringsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `NetworkPeering` resource by the update. The fields specified in the +// `update_mask` are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsGlobalNetworkPeeringsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalNetworkPeeringsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGlobalNetworkPeeringsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalNetworkPeeringsPatchCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalNetworkPeeringsPatchCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalNetworkPeeringsPatchCall) 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.networkpeering) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.global.networkPeerings.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalNetworkPeeringsPatchCall) 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": "Modifies a `NetworkPeering` resource. Only the `description` field can be updated. Only fields specified in `updateMask` are applied.", + // "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings/{networkPeeringsId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.global.networkPeerings.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of the network peering. Resource names are scheme-less URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/networkPeerings/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `NetworkPeering` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "NetworkPeering" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.global.networkPeerings.peeringRoutes.list": + +type ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the network peering routes exchanged over a peering +// connection. +// +// - parent: The resource name of the network peering to retrieve +// peering routes from. Resource names are schemeless URIs that follow +// the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/global/networkPeerings/my-peering`. +func (r *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesService) List(parent string) *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall { + c := &ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. Currently, only filtering +// on the `direction` field is supported. To return routes imported from +// the peer network, provide "direction=INCOMING". To return routes +// exported from the VMware Engine network, provide +// "direction=OUTGOING". Other filter expressions return an error. +func (c *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall) Filter(filter string) *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of peering routes to return in one page. The service may return fewer +// than this value. The maximum value is coerced to 1000. The default +// value of this field is 500. +func (c *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListPeeringRoutes` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListPeeringRoutes` must match the call that provided the +// page token. +func (c *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall) PageToken(pageToken string) *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall) Context(ctx context.Context) *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall { + 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 *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall) 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}/peeringRoutes") + 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 "vmwareengine.projects.locations.global.networkPeerings.peeringRoutes.list" call. +// Exactly one of *ListPeeringRoutesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListPeeringRoutesResponse.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 *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall) Do(opts ...googleapi.CallOption) (*ListPeeringRoutesResponse, 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 := &ListPeeringRoutesResponse{ + 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 network peering routes exchanged over a peering connection.", + // "flatPath": "v1/projects/{projectsId}/locations/global/networkPeerings/{networkPeeringsId}/peeringRoutes", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.global.networkPeerings.peeringRoutes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. Currently, only filtering on the `direction` field is supported. To return routes imported from the peer network, provide \"direction=INCOMING\". To return routes exported from the VMware Engine network, provide \"direction=OUTGOING\". Other filter expressions return an error.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of peering routes to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListPeeringRoutes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPeeringRoutes` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the network peering to retrieve peering routes from. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/networkPeerings/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/peeringRoutes", + // "response": { + // "$ref": "ListPeeringRoutesResponse" + // }, + // "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 *ProjectsLocationsGlobalNetworkPeeringsPeeringRoutesListCall) Pages(ctx context.Context, f func(*ListPeeringRoutesResponse) 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 "vmwareengine.projects.locations.networkPolicies.create": + +type ProjectsLocationsNetworkPoliciesCreateCall struct { + s *Service + parent string + networkpolicy *NetworkPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new network policy in a given VMware Engine network +// of a project and location (region). A new network policy cannot be +// created if another network policy already exists in the same scope. +// +// - parent: The resource name of the location (region) to create the +// new network policy in. Resource names are schemeless URIs that +// follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1`. +func (r *ProjectsLocationsNetworkPoliciesService) Create(parent string, networkpolicy *NetworkPolicy) *ProjectsLocationsNetworkPoliciesCreateCall { + c := &ProjectsLocationsNetworkPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.networkpolicy = networkpolicy + return c +} + +// NetworkPolicyId sets the optional parameter "networkPolicyId": +// Required. The user-provided identifier of the network policy to be +// created. This identifier must be unique within parent +// `projects/{my-project}/locations/{us-central1}/networkPolicies` and +// becomes the final token in the name URI. The identifier must meet the +// following requirements: * Only contains 1-63 alphanumeric characters +// and hyphens * Begins with an alphabetical character * Ends with a +// non-hyphen character * Not formatted as a UUID * Complies with RFC +// 1034 (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsNetworkPoliciesCreateCall) NetworkPolicyId(networkPolicyId string) *ProjectsLocationsNetworkPoliciesCreateCall { + c.urlParams_.Set("networkPolicyId", networkPolicyId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsNetworkPoliciesCreateCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesCreateCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsNetworkPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesCreateCall { + 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 *ProjectsLocationsNetworkPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesCreateCall { + 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 *ProjectsLocationsNetworkPoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesCreateCall) 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.networkpolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/networkPolicies") + 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 "vmwareengine.projects.locations.networkPolicies.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 *ProjectsLocationsNetworkPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.networkPolicies.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "networkPolicyId": { + // "description": "Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/networkPolicies", + // "request": { + // "$ref": "NetworkPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.networkPolicies.delete": + +type ProjectsLocationsNetworkPoliciesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a `NetworkPolicy` resource. A network policy cannot +// be deleted when `NetworkService.state` is set to `RECONCILING` for +// either its external IP or internet access service. +// +// - name: The resource name of the network policy to delete. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-networ +// k-policy`. +func (r *ProjectsLocationsNetworkPoliciesService) Delete(name string) *ProjectsLocationsNetworkPoliciesDeleteCall { + c := &ProjectsLocationsNetworkPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsNetworkPoliciesDeleteCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsNetworkPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesDeleteCall { + 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 *ProjectsLocationsNetworkPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesDeleteCall { + 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 *ProjectsLocationsNetworkPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesDeleteCall) 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 "vmwareengine.projects.locations.networkPolicies.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNetworkPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a `NetworkPolicy` resource. A network policy cannot be deleted when `NetworkService.state` is set to `RECONCILING` for either its external IP or internet access service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.networkPolicies.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the network policy to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.networkPolicies.fetchExternalAddresses": + +type ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall struct { + s *Service + networkPolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// FetchExternalAddresses: Lists external IP addresses assigned to +// VMware workload VMs within the scope of the given network policy. +// +// - networkPolicy: The resource name of the network policy to query for +// assigned external IP addresses. Resource names are schemeless URIs +// that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-policy +// `. +func (r *ProjectsLocationsNetworkPoliciesService) FetchExternalAddresses(networkPolicy string) *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall { + c := &ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.networkPolicy = networkPolicy + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of external IP addresses to return in one page. The service may +// return fewer than this value. The maximum value is coerced to 1000. +// The default value of this field is 500. +func (c *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall) PageSize(pageSize int64) *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `FetchNetworkPolicyExternalAddresses` call. +// Provide this to retrieve the subsequent page. When paginating, all +// parameters provided to `FetchNetworkPolicyExternalAddresses`, except +// for `page_size` and `page_token`, must match the call that provided +// the page token. +func (c *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall) PageToken(pageToken string) *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall { + 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 *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall { + 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 *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall { + 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 *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall { + 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 *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall) 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/{+networkPolicy}:fetchExternalAddresses") + 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{ + "networkPolicy": c.networkPolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.networkPolicies.fetchExternalAddresses" call. +// Exactly one of *FetchNetworkPolicyExternalAddressesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *FetchNetworkPolicyExternalAddressesResponse.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 *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall) Do(opts ...googleapi.CallOption) (*FetchNetworkPolicyExternalAddressesResponse, 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 := &FetchNetworkPolicyExternalAddressesResponse{ + 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 external IP addresses assigned to VMware workload VMs within the scope of the given network policy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}:fetchExternalAddresses", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.networkPolicies.fetchExternalAddresses", + // "parameterOrder": [ + // "networkPolicy" + // ], + // "parameters": { + // "networkPolicy": { + // "description": "Required. The resource name of the network policy to query for assigned external IP addresses. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of external IP addresses to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the subsequent page. When paginating, all parameters provided to `FetchNetworkPolicyExternalAddresses`, except for `page_size` and `page_token`, must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+networkPolicy}:fetchExternalAddresses", + // "response": { + // "$ref": "FetchNetworkPolicyExternalAddressesResponse" + // }, + // "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 *ProjectsLocationsNetworkPoliciesFetchExternalAddressesCall) Pages(ctx context.Context, f func(*FetchNetworkPolicyExternalAddressesResponse) 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 "vmwareengine.projects.locations.networkPolicies.get": + +type ProjectsLocationsNetworkPoliciesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a `NetworkPolicy` resource by its resource name. +// +// - name: The resource name of the network policy to retrieve. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-networ +// k-policy`. +func (r *ProjectsLocationsNetworkPoliciesService) Get(name string) *ProjectsLocationsNetworkPoliciesGetCall { + c := &ProjectsLocationsNetworkPoliciesGetCall{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 *ProjectsLocationsNetworkPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesGetCall { + 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 *ProjectsLocationsNetworkPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworkPoliciesGetCall { + 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 *ProjectsLocationsNetworkPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesGetCall { + 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 *ProjectsLocationsNetworkPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesGetCall) 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 "vmwareengine.projects.locations.networkPolicies.get" call. +// Exactly one of *NetworkPolicy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *NetworkPolicy.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 *ProjectsLocationsNetworkPoliciesGetCall) Do(opts ...googleapi.CallOption) (*NetworkPolicy, 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 := &NetworkPolicy{ + 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 `NetworkPolicy` resource by its resource name.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.networkPolicies.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the network policy to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "NetworkPolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.networkPolicies.list": + +type ProjectsLocationsNetworkPoliciesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `NetworkPolicy` resources in a specified project and +// location. +// +// - parent: The resource name of the location (region) to query for +// network policies. Resource names are schemeless URIs that follow +// the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1`. +func (r *ProjectsLocationsNetworkPoliciesService) List(parent string) *ProjectsLocationsNetworkPoliciesListCall { + c := &ProjectsLocationsNetworkPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of network policies, you can +// exclude the ones named `example-policy` by specifying `name != +// "example-policy". To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` (name = +// "example-policy") (createTime > "2021-04-12T08:15:10.40Z") ``` By +// default, each expression is an `AND` expression. However, you can +// include `AND` and `OR` expressions explicitly. For example: ``` (name +// = "example-policy-1") AND (createTime > "2021-04-12T08:15:10.40Z") OR +// (name = "example-policy-2") ``` +func (c *ProjectsLocationsNetworkPoliciesListCall) Filter(filter string) *ProjectsLocationsNetworkPoliciesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsNetworkPoliciesListCall) OrderBy(orderBy string) *ProjectsLocationsNetworkPoliciesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of network policies to return in one page. The service may return +// fewer than this value. The maximum value is coerced to 1000. The +// default value of this field is 500. +func (c *ProjectsLocationsNetworkPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsNetworkPoliciesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListNetworkPolicies` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListNetworkPolicies` must match the call that provided +// the page token. +func (c *ProjectsLocationsNetworkPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsNetworkPoliciesListCall { + 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 *ProjectsLocationsNetworkPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesListCall { + 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 *ProjectsLocationsNetworkPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworkPoliciesListCall { + 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 *ProjectsLocationsNetworkPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesListCall { + 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 *ProjectsLocationsNetworkPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesListCall) 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}/networkPolicies") + 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 "vmwareengine.projects.locations.networkPolicies.list" call. +// Exactly one of *ListNetworkPoliciesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListNetworkPoliciesResponse.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 *ProjectsLocationsNetworkPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListNetworkPoliciesResponse, 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 := &ListNetworkPoliciesResponse{ + 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 `NetworkPolicy` resources in a specified project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.networkPolicies.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of network policies, you can exclude the ones named `example-policy` by specifying `name != \"example-policy\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-policy\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-policy-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-policy-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of network policies to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListNetworkPolicies` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNetworkPolicies` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the location (region) to query for network policies. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/networkPolicies", + // "response": { + // "$ref": "ListNetworkPoliciesResponse" + // }, + // "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 *ProjectsLocationsNetworkPoliciesListCall) Pages(ctx context.Context, f func(*ListNetworkPoliciesResponse) 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 "vmwareengine.projects.locations.networkPolicies.patch": + +type ProjectsLocationsNetworkPoliciesPatchCall struct { + s *Service + name string + networkpolicy *NetworkPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Modifies a `NetworkPolicy` resource. Only the following fields +// can be updated: `internet_access`, `external_ip`, +// `edge_services_cidr`. Only fields specified in `updateMask` are +// applied. When updating a network policy, the external IP network +// service can only be disabled if there are no external IP addresses +// present in the scope of the policy. Also, a `NetworkService` cannot +// be updated when `NetworkService.state` is set to `RECONCILING`. +// During operation processing, the resource is temporarily in the +// `ACTIVE` state before the operation fully completes. For that period +// of time, you can't update the resource. Use the operation status to +// determine when the processing fully completes. +// +// - name: Output only. The resource name of this network policy. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-networ +// k-policy`. +func (r *ProjectsLocationsNetworkPoliciesService) Patch(name string, networkpolicy *NetworkPolicy) *ProjectsLocationsNetworkPoliciesPatchCall { + c := &ProjectsLocationsNetworkPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.networkpolicy = networkpolicy + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsNetworkPoliciesPatchCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `NetworkPolicy` resource by the update. The fields specified in the +// `update_mask` are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsNetworkPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNetworkPoliciesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNetworkPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesPatchCall { + 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 *ProjectsLocationsNetworkPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesPatchCall { + 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 *ProjectsLocationsNetworkPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesPatchCall) 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.networkpolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.networkPolicies.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNetworkPoliciesPatchCall) 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": "Modifies a `NetworkPolicy` resource. Only the following fields can be updated: `internet_access`, `external_ip`, `edge_services_cidr`. Only fields specified in `updateMask` are applied. When updating a network policy, the external IP network service can only be disabled if there are no external IP addresses present in the scope of the policy. Also, a `NetworkService` cannot be updated when `NetworkService.state` is set to `RECONCILING`. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.networkPolicies.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `NetworkPolicy` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "NetworkPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.networkPolicies.externalAccessRules.create": + +type ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall struct { + s *Service + parent string + externalaccessrule *ExternalAccessRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new external access rule in a given network policy. +// +// - parent: The resource name of the network policy to create a new +// external access firewall rule in. Resource names are schemeless +// URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-policy +// `. +func (r *ProjectsLocationsNetworkPoliciesExternalAccessRulesService) Create(parent string, externalaccessrule *ExternalAccessRule) *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall { + c := &ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.externalaccessrule = externalaccessrule + return c +} + +// ExternalAccessRuleId sets the optional parameter +// "externalAccessRuleId": Required. The user-provided identifier of the +// `ExternalAccessRule` to be created. This identifier must be unique +// among `ExternalAccessRule` resources within the parent and becomes +// the final token in the name URI. The identifier must meet the +// following requirements: * Only contains 1-63 alphanumeric characters +// and hyphens * Begins with an alphabetical character * Ends with a +// non-hyphen character * Not formatted as a UUID * Complies with RFC +// 1034 (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall) ExternalAccessRuleId(externalAccessRuleId string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall { + c.urlParams_.Set("externalAccessRuleId", externalAccessRuleId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if the original operation +// with the same request ID was received, and if so, will ignore the +// second request. This prevents clients from accidentally creating +// duplicate commitments. The request ID must be a valid UUID with the +// exception that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall) 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.externalaccessrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/externalAccessRules") + 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 "vmwareengine.projects.locations.networkPolicies.externalAccessRules.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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new external access rule in a given network policy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "externalAccessRuleId": { + // "description": "Required. The user-provided identifier of the `ExternalAccessRule` to be created. This identifier must be unique among `ExternalAccessRule` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the network policy to create a new external access firewall rule in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/externalAccessRules", + // "request": { + // "$ref": "ExternalAccessRule" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.networkPolicies.externalAccessRules.delete": + +type ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single external access rule. +// +// - name: The resource name of the external access firewall rule to +// delete. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-policy +// /externalAccessRules/my-rule`. +func (r *ProjectsLocationsNetworkPoliciesExternalAccessRulesService) Delete(name string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall { + c := &ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if the original operation +// with the same request ID was received, and if so, will ignore the +// second request. This prevents clients from accidentally creating +// duplicate commitments. The request ID must be a valid UUID with the +// exception that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall) 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 "vmwareengine.projects.locations.networkPolicies.externalAccessRules.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single external access rule.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules/{externalAccessRulesId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the external access firewall rule to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+/externalAccessRules/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.networkPolicies.externalAccessRules.get": + +type ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single external access rule. +// +// - name: The resource name of the external access firewall rule to +// retrieve. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-policy +// /externalAccessRules/my-rule`. +func (r *ProjectsLocationsNetworkPoliciesExternalAccessRulesService) Get(name string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall { + c := &ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall{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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall) 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 "vmwareengine.projects.locations.networkPolicies.externalAccessRules.get" call. +// Exactly one of *ExternalAccessRule or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ExternalAccessRule.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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesGetCall) Do(opts ...googleapi.CallOption) (*ExternalAccessRule, 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 := &ExternalAccessRule{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single external access rule.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules/{externalAccessRulesId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the external access firewall rule to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+/externalAccessRules/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "ExternalAccessRule" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.networkPolicies.externalAccessRules.list": + +type ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `ExternalAccessRule` resources in the specified network +// policy. +// +// - parent: The resource name of the network policy to query for +// external access firewall rules. Resource names are schemeless URIs +// that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-policy +// `. +func (r *ProjectsLocationsNetworkPoliciesExternalAccessRulesService) List(parent string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall { + c := &ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of external access rules, you +// can exclude the ones named `example-rule` by specifying `name != +// "example-rule". To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` (name = +// "example-rule") (createTime > "2021-04-12T08:15:10.40Z") ``` By +// default, each expression is an `AND` expression. However, you can +// include `AND` and `OR` expressions explicitly. For example: ``` (name +// = "example-rule-1") AND (createTime > "2021-04-12T08:15:10.40Z") OR +// (name = "example-rule-2") ``` +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall) Filter(filter string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall) OrderBy(orderBy string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of external access rules to return in one page. The service may +// return fewer than this value. The maximum value is coerced to 1000. +// The default value of this field is 500. +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall) PageSize(pageSize int64) *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListExternalAccessRulesRequest` call. +// Provide this to retrieve the subsequent page. When paginating, all +// other parameters provided to `ListExternalAccessRulesRequest` must +// match the call that provided the page token. +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall) PageToken(pageToken string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall) 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}/externalAccessRules") + 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 "vmwareengine.projects.locations.networkPolicies.externalAccessRules.list" call. +// Exactly one of *ListExternalAccessRulesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListExternalAccessRulesResponse.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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall) Do(opts ...googleapi.CallOption) (*ListExternalAccessRulesResponse, 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 := &ListExternalAccessRulesResponse{ + 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 `ExternalAccessRule` resources in the specified network policy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of external access rules, you can exclude the ones named `example-rule` by specifying `name != \"example-rule\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-rule\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-rule-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-rule-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of external access rules to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListExternalAccessRulesRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExternalAccessRulesRequest` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the network policy to query for external access firewall rules. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/externalAccessRules", + // "response": { + // "$ref": "ListExternalAccessRulesResponse" + // }, + // "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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesListCall) Pages(ctx context.Context, f func(*ListExternalAccessRulesResponse) 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 "vmwareengine.projects.locations.networkPolicies.externalAccessRules.patch": + +type ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall struct { + s *Service + name string + externalaccessrule *ExternalAccessRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single external access rule. Only +// fields specified in `update_mask` are applied. +// +// - name: Output only. The resource name of this external access rule. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-policy +// /externalAccessRules/my-rule`. +func (r *ProjectsLocationsNetworkPoliciesExternalAccessRulesService) Patch(name string, externalaccessrule *ExternalAccessRule) *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall { + c := &ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.externalaccessrule = externalaccessrule + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if the original operation +// with the same request ID was received, and if so, will ignore the +// second request. This prevents clients from accidentally creating +// duplicate commitments. The request ID must be a valid UUID with the +// exception that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `ExternalAccessRule` resource by the update. The fields specified in +// the `update_mask` are relative to the resource, not the full request. +// A field will be overwritten if it is in the mask. If the user does +// not provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall { + 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 *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall) 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.externalaccessrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.networkPolicies.externalAccessRules.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNetworkPoliciesExternalAccessRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single external access rule. Only fields specified in `update_mask` are applied.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules/{externalAccessRulesId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of this external access rule. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+/externalAccessRules/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `ExternalAccessRule` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "ExternalAccessRule" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.nodeTypes.get": + +type ProjectsLocationsNodeTypesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single `NodeType`. +// +// - name: The resource name of the node type to retrieve. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`. +func (r *ProjectsLocationsNodeTypesService) Get(name string) *ProjectsLocationsNodeTypesGetCall { + c := &ProjectsLocationsNodeTypesGetCall{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 *ProjectsLocationsNodeTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodeTypesGetCall { + 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 *ProjectsLocationsNodeTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodeTypesGetCall { + 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 *ProjectsLocationsNodeTypesGetCall) Context(ctx context.Context) *ProjectsLocationsNodeTypesGetCall { + 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 *ProjectsLocationsNodeTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodeTypesGetCall) 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 "vmwareengine.projects.locations.nodeTypes.get" call. +// Exactly one of *NodeType or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *NodeType.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 *ProjectsLocationsNodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, 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 := &NodeType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single `NodeType`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes/{nodeTypesId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.nodeTypes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the node type to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nodeTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "NodeType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.nodeTypes.list": + +type ProjectsLocationsNodeTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists node types +// +// - parent: The resource name of the location to be queried for node +// types. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: `projects/my-project/locations/us-central1-a`. +func (r *ProjectsLocationsNodeTypesService) List(parent string) *ProjectsLocationsNodeTypesListCall { + c := &ProjectsLocationsNodeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of node types, you can exclude +// the ones named `standard-72` by specifying `name != "standard-72". +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example: ``` (name = "standard-72") +// (virtual_cpu_count > 2) ``` By default, each expression is an `AND` +// expression. However, you can include `AND` and `OR` expressions +// explicitly. For example: ``` (name = "standard-96") AND +// (virtual_cpu_count > 2) OR (name = "standard-72") ``` +func (c *ProjectsLocationsNodeTypesListCall) Filter(filter string) *ProjectsLocationsNodeTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of node types to return in one page. The service may return fewer +// than this value. The maximum value is coerced to 1000. The default +// value of this field is 500. +func (c *ProjectsLocationsNodeTypesListCall) PageSize(pageSize int64) *ProjectsLocationsNodeTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListNodeTypes` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListNodeTypes` must match the call that provided the +// page token. +func (c *ProjectsLocationsNodeTypesListCall) PageToken(pageToken string) *ProjectsLocationsNodeTypesListCall { + 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 *ProjectsLocationsNodeTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodeTypesListCall { + 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 *ProjectsLocationsNodeTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodeTypesListCall { + 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 *ProjectsLocationsNodeTypesListCall) Context(ctx context.Context) *ProjectsLocationsNodeTypesListCall { + 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 *ProjectsLocationsNodeTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodeTypesListCall) 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}/nodeTypes") + 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 "vmwareengine.projects.locations.nodeTypes.list" call. +// Exactly one of *ListNodeTypesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListNodeTypesResponse.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 *ProjectsLocationsNodeTypesListCall) Do(opts ...googleapi.CallOption) (*ListNodeTypesResponse, 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 := &ListNodeTypesResponse{ + 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 node types", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.nodeTypes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of node types, you can exclude the ones named `standard-72` by specifying `name != \"standard-72\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"standard-72\") (virtual_cpu_count \u003e 2) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"standard-96\") AND (virtual_cpu_count \u003e 2) OR (name = \"standard-72\") ```", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of node types to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListNodeTypes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNodeTypes` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the location to be queried for node types. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/nodeTypes", + // "response": { + // "$ref": "ListNodeTypesResponse" + // }, + // "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 *ProjectsLocationsNodeTypesListCall) Pages(ctx context.Context, f func(*ListNodeTypesResponse) 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 "vmwareengine.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall 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 *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + 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 "vmwareengine.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.privateClouds.create": + +type ProjectsLocationsPrivateCloudsCreateCall struct { + s *Service + parent string + privatecloud *PrivateCloud + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new `PrivateCloud` resource in a given project and +// location. Private clouds of type `STANDARD` and `TIME_LIMITED` are +// zonal resources, `STRETCHED` private clouds are regional. Creating a +// private cloud also creates a management cluster +// (https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) +// for that private cloud. +// +// - parent: The resource name of the location to create the new private +// cloud in. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: `projects/my-project/locations/us-central1-a`. +func (r *ProjectsLocationsPrivateCloudsService) Create(parent string, privatecloud *PrivateCloud) *ProjectsLocationsPrivateCloudsCreateCall { + c := &ProjectsLocationsPrivateCloudsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.privatecloud = privatecloud + return c +} + +// PrivateCloudId sets the optional parameter "privateCloudId": +// Required. The user-provided identifier of the private cloud to be +// created. This identifier must be unique among each `PrivateCloud` +// within the parent and becomes the final token in the name URI. The +// identifier must meet the following requirements: * Only contains 1-63 +// alphanumeric characters and hyphens * Begins with an alphabetical +// character * Ends with a non-hyphen character * Not formatted as a +// UUID * Complies with RFC 1034 +// (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsPrivateCloudsCreateCall) PrivateCloudId(privateCloudId string) *ProjectsLocationsPrivateCloudsCreateCall { + c.urlParams_.Set("privateCloudId", privateCloudId) + return c +} + +// RequestId sets the optional parameter "requestId": The request ID +// must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": True if you +// want the request to be validated and not executed; false otherwise. +func (c *ProjectsLocationsPrivateCloudsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPrivateCloudsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsPrivateCloudsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsCreateCall { + 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 *ProjectsLocationsPrivateCloudsCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsCreateCall { + 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 *ProjectsLocationsPrivateCloudsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsCreateCall) 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.privatecloud) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/privateClouds") + 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 "vmwareengine.projects.locations.privateClouds.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 *ProjectsLocationsPrivateCloudsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new `PrivateCloud` resource in a given project and location. Private clouds of type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are regional. Creating a private cloud also creates a [management cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the location to create the new private cloud in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "privateCloudId": { + // "description": "Required. The user-provided identifier of the private cloud to be created. This identifier must be unique among each `PrivateCloud` within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/privateClouds", + // "request": { + // "$ref": "PrivateCloud" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.delete": + +type ProjectsLocationsPrivateCloudsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Schedules a `PrivateCloud` resource for deletion. A +// `PrivateCloud` resource scheduled for deletion has +// `PrivateCloud.state` set to `DELETED` and `expireTime` set to the +// time when deletion is final and can no longer be reversed. The delete +// operation is marked as done as soon as the `PrivateCloud` is +// successfully scheduled for deletion (this also applies when +// `delayHours` is set to zero), and the operation is not kept in +// pending state until `PrivateCloud` is purged. `PrivateCloud` can be +// restored using `UndeletePrivateCloud` method before the `expireTime` +// elapses. When `expireTime` is reached, deletion is final and all +// private cloud resources are irreversibly removed and billing stops. +// During the final removal process, `PrivateCloud.state` is set to +// `PURGING`. `PrivateCloud` can be polled using standard `GET` method +// for the whole period of deletion and purging. It will not be returned +// only when it is completely purged. +// +// - name: The resource name of the private cloud to delete. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) Delete(name string) *ProjectsLocationsPrivateCloudsDeleteCall { + c := &ProjectsLocationsPrivateCloudsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// DelayHours sets the optional parameter "delayHours": Time delay of +// the deletion specified in hours. The default value is `3`. Specifying +// a non-zero value for this field changes the value of +// `PrivateCloud.state` to `DELETED` and sets `expire_time` to the +// planned deletion time. Deletion can be cancelled before `expire_time` +// elapses using VmwareEngine.UndeletePrivateCloud. Specifying a value +// of `0` for this field instead begins the deletion process and ceases +// billing immediately. During the final deletion process, the value of +// `PrivateCloud.state` becomes `PURGING`. +func (c *ProjectsLocationsPrivateCloudsDeleteCall) DelayHours(delayHours int64) *ProjectsLocationsPrivateCloudsDeleteCall { + c.urlParams_.Set("delayHours", fmt.Sprint(delayHours)) + return c +} + +// Force sets the optional parameter "force": If set to true, cascade +// delete is enabled and all children of this private cloud resource are +// also deleted. When this flag is set to false, the private cloud will +// not be deleted if there are any children other than the management +// cluster. The management cluster is always deleted. +func (c *ProjectsLocationsPrivateCloudsDeleteCall) Force(force bool) *ProjectsLocationsPrivateCloudsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// RequestId sets the optional parameter "requestId": The request ID +// must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsPrivateCloudsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsDeleteCall { + 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 *ProjectsLocationsPrivateCloudsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsDeleteCall { + 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 *ProjectsLocationsPrivateCloudsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsDeleteCall) 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 "vmwareengine.projects.locations.privateClouds.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsDeleteCall) 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": "Schedules a `PrivateCloud` resource for deletion. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `expireTime` set to the time when deletion is final and can no longer be reversed. The delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached, deletion is final and all private cloud resources are irreversibly removed and billing stops. During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can be polled using standard `GET` method for the whole period of deletion and purging. It will not be returned only when it is completely purged.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.privateClouds.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "delayHours": { + // "description": "Optional. Time delay of the deletion specified in hours. The default value is `3`. Specifying a non-zero value for this field changes the value of `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned deletion time. Deletion can be cancelled before `expire_time` elapses using VmwareEngine.UndeletePrivateCloud. Specifying a value of `0` for this field instead begins the deletion process and ceases billing immediately. During the final deletion process, the value of `PrivateCloud.state` becomes `PURGING`.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "force": { + // "description": "Optional. If set to true, cascade delete is enabled and all children of this private cloud resource are also deleted. When this flag is set to false, the private cloud will not be deleted if there are any children other than the management cluster. The management cluster is always deleted.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. The resource name of the private cloud to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.get": + +type ProjectsLocationsPrivateCloudsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a `PrivateCloud` resource by its resource name. +// +// - name: The resource name of the private cloud to retrieve. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) Get(name string) *ProjectsLocationsPrivateCloudsGetCall { + c := &ProjectsLocationsPrivateCloudsGetCall{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 *ProjectsLocationsPrivateCloudsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsGetCall { + 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 *ProjectsLocationsPrivateCloudsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsGetCall { + 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 *ProjectsLocationsPrivateCloudsGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsGetCall { + 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 *ProjectsLocationsPrivateCloudsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsGetCall) 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 "vmwareengine.projects.locations.privateClouds.get" call. +// Exactly one of *PrivateCloud or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *PrivateCloud.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 *ProjectsLocationsPrivateCloudsGetCall) Do(opts ...googleapi.CallOption) (*PrivateCloud, 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 := &PrivateCloud{ + 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 `PrivateCloud` resource by its resource name.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the private cloud to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "PrivateCloud" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.getDnsForwarding": + +type ProjectsLocationsPrivateCloudsGetDnsForwardingCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetDnsForwarding: Gets details of the `DnsForwarding` config. +// +// - name: The resource name of a `DnsForwarding` to retrieve. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// dnsForwarding`. +func (r *ProjectsLocationsPrivateCloudsService) GetDnsForwarding(name string) *ProjectsLocationsPrivateCloudsGetDnsForwardingCall { + c := &ProjectsLocationsPrivateCloudsGetDnsForwardingCall{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 *ProjectsLocationsPrivateCloudsGetDnsForwardingCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsGetDnsForwardingCall { + 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 *ProjectsLocationsPrivateCloudsGetDnsForwardingCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsGetDnsForwardingCall { + 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 *ProjectsLocationsPrivateCloudsGetDnsForwardingCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsGetDnsForwardingCall { + 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 *ProjectsLocationsPrivateCloudsGetDnsForwardingCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsGetDnsForwardingCall) 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 "vmwareengine.projects.locations.privateClouds.getDnsForwarding" call. +// Exactly one of *DnsForwarding or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DnsForwarding.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 *ProjectsLocationsPrivateCloudsGetDnsForwardingCall) Do(opts ...googleapi.CallOption) (*DnsForwarding, 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 := &DnsForwarding{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of the `DnsForwarding` config.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/dnsForwarding", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.getDnsForwarding", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of a `DnsForwarding` to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/dnsForwarding$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "DnsForwarding" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.getIamPolicy": + +type ProjectsLocationsPrivateCloudsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsPrivateCloudsService) GetIamPolicy(resource string) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.list": + +type ProjectsLocationsPrivateCloudsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `PrivateCloud` resources in a given project and location. +// +// - parent: The resource name of the private cloud to be queried for +// clusters. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: `projects/my-project/locations/us-central1-a`. +func (r *ProjectsLocationsPrivateCloudsService) List(parent string) *ProjectsLocationsPrivateCloudsListCall { + c := &ProjectsLocationsPrivateCloudsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of private clouds, you can +// exclude the ones named `example-pc` by specifying `name != +// "example-pc". You can also filter nested fields. For example, you +// could specify `networkConfig.managementCidr = "192.168.0.0/24" to +// include private clouds only if they have a matching address in their +// network configuration. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` (name = +// "example-pc") (createTime > "2021-04-12T08:15:10.40Z") ``` By +// default, each expression is an `AND` expression. However, you can +// include `AND` and `OR` expressions explicitly. For example: ``` (name +// = "private-cloud-1") AND (createTime > "2021-04-12T08:15:10.40Z") OR +// (name = "private-cloud-2") ``` +func (c *ProjectsLocationsPrivateCloudsListCall) Filter(filter string) *ProjectsLocationsPrivateCloudsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsPrivateCloudsListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateCloudsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of private clouds to return in one page. The service may return fewer +// than this value. The maximum value is coerced to 1000. The default +// value of this field is 500. +func (c *ProjectsLocationsPrivateCloudsListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListPrivateClouds` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListPrivateClouds` must match the call that provided the +// page token. +func (c *ProjectsLocationsPrivateCloudsListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsListCall { + 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 *ProjectsLocationsPrivateCloudsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsListCall { + 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 *ProjectsLocationsPrivateCloudsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsListCall { + 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 *ProjectsLocationsPrivateCloudsListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsListCall { + 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 *ProjectsLocationsPrivateCloudsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsListCall) 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}/privateClouds") + 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 "vmwareengine.projects.locations.privateClouds.list" call. +// Exactly one of *ListPrivateCloudsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListPrivateCloudsResponse.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 *ProjectsLocationsPrivateCloudsListCall) Do(opts ...googleapi.CallOption) (*ListPrivateCloudsResponse, 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 := &ListPrivateCloudsResponse{ + 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 `PrivateCloud` resources in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of private clouds, you can exclude the ones named `example-pc` by specifying `name != \"example-pc\"`. You can also filter nested fields. For example, you could specify `networkConfig.managementCidr = \"192.168.0.0/24\"` to include private clouds only if they have a matching address in their network configuration. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-pc\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"private-cloud-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"private-cloud-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of private clouds to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListPrivateClouds` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateClouds` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to be queried for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/privateClouds", + // "response": { + // "$ref": "ListPrivateCloudsResponse" + // }, + // "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 *ProjectsLocationsPrivateCloudsListCall) Pages(ctx context.Context, f func(*ListPrivateCloudsResponse) 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 "vmwareengine.projects.locations.privateClouds.patch": + +type ProjectsLocationsPrivateCloudsPatchCall struct { + s *Service + name string + privatecloud *PrivateCloud + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Modifies a `PrivateCloud` resource. Only the following fields +// can be updated: `description`. Only fields specified in `updateMask` +// are applied. During operation processing, the resource is temporarily +// in the `ACTIVE` state before the operation fully completes. For that +// period of time, you can't update the resource. Use the operation +// status to determine when the processing fully completes. +// +// - name: Output only. The resource name of this private cloud. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) Patch(name string, privatecloud *PrivateCloud) *ProjectsLocationsPrivateCloudsPatchCall { + c := &ProjectsLocationsPrivateCloudsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.privatecloud = privatecloud + return c +} + +// RequestId sets the optional parameter "requestId": The request ID +// must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsPatchCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `PrivateCloud` resource by the update. The fields specified in +// `updateMask` are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsPrivateCloudsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsPrivateCloudsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsPatchCall { + 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 *ProjectsLocationsPrivateCloudsPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsPatchCall { + 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 *ProjectsLocationsPrivateCloudsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsPatchCall) 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.privatecloud) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsPatchCall) 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": "Modifies a `PrivateCloud` resource. Only the following fields can be updated: `description`. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.privateClouds.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of this private cloud. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `PrivateCloud` resource by the update. The fields specified in `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "PrivateCloud" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.resetNsxCredentials": + +type ProjectsLocationsPrivateCloudsResetNsxCredentialsCall struct { + s *Service + privateCloud string + resetnsxcredentialsrequest *ResetNsxCredentialsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ResetNsxCredentials: Resets credentials of the NSX appliance. +// +// - privateCloud: The resource name of the private cloud to reset +// credentials for. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) ResetNsxCredentials(privateCloud string, resetnsxcredentialsrequest *ResetNsxCredentialsRequest) *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall { + c := &ProjectsLocationsPrivateCloudsResetNsxCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.privateCloud = privateCloud + c.resetnsxcredentialsrequest = resetnsxcredentialsrequest 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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall { 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { - 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 *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall { 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 *ProjectsLocationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetnsxcredentialsrequest) + 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/{+privateCloud}:resetNsxCredentials") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "privateCloud": c.privateCloud, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.get" call. -// Exactly one of *Location or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Location.ServerResponse.Header or (if a response was returned at +// Do executes the "vmwareengine.projects.locations.privateClouds.resetNsxCredentials" 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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { +func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2745,7 +10350,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Location{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2757,25 +10362,28 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } return ret, nil // { - // "description": "Gets information about a location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.get", + // "description": "Resets credentials of the NSX appliance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:resetNsxCredentials", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.resetNsxCredentials", // "parameterOrder": [ - // "name" + // "privateCloud" // ], // "parameters": { - // "name": { - // "description": "Resource name for the location.", + // "privateCloud": { + // "description": "Required. The resource name of the private cloud to reset credentials for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+privateCloud}:resetNsxCredentials", + // "request": { + // "$ref": "ResetNsxCredentialsRequest" + // }, // "response": { - // "$ref": "Location" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2784,121 +10392,239 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } -// method id "vmwareengine.projects.locations.list": +// method id "vmwareengine.projects.locations.privateClouds.resetVcenterCredentials": -type ProjectsLocationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall struct { + s *Service + privateCloud string + resetvcentercredentialsrequest *ResetVcenterCredentialsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists information about the supported locations for this -// service. +// ResetVcenterCredentials: Resets credentials of the Vcenter appliance. // -// - name: The resource that owns the locations collection, if -// applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - privateCloud: The resource name of the private cloud to reset +// credentials for. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) ResetVcenterCredentials(privateCloud string, resetvcentercredentialsrequest *ResetVcenterCredentialsRequest) *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall { + c := &ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.privateCloud = privateCloud + c.resetvcentercredentialsrequest = resetvcentercredentialsrequest return c } -// Filter sets the optional parameter "filter": A filter to narrow down -// results to a preferred subset. The filtering language accepts strings -// like "displayName=tokyo", and is documented in more detail in -// AIP-160 (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// 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 *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall { + c.ctx_ = ctx return c } -// PageToken sets the optional parameter "pageToken": A page token -// received from the `next_page_token` field in the response. Send that -// page token to receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) 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.resetvcentercredentialsrequest) + 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/{+privateCloud}:resetVcenterCredentials") + 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{ + "privateCloud": c.privateCloud, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.resetVcenterCredentials" 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 *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) 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": "Resets credentials of the Vcenter appliance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:resetVcenterCredentials", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.resetVcenterCredentials", + // "parameterOrder": [ + // "privateCloud" + // ], + // "parameters": { + // "privateCloud": { + // "description": "Required. The resource name of the private cloud to reset credentials for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+privateCloud}:resetVcenterCredentials", + // "request": { + // "$ref": "ResetVcenterCredentialsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.setIamPolicy": + +type ProjectsLocationsPrivateCloudsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsPrivateCloudsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsPrivateCloudsSetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest 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 *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsSetIamPolicyCall { 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { - 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 *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsSetIamPolicyCall { 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 *ProjectsLocationsListCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + 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}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.list" call. -// Exactly one of *ListLocationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2917,7 +10643,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLocationsResponse{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2929,41 +10655,28 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } return ret, nil // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1/projects/{projectsId}/locations", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.list", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "filter": { - // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The resource that owns the locations collection, if applicable.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}/locations", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, // "response": { - // "$ref": "ListLocationsResponse" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2972,147 +10685,99 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } -// 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) 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 "vmwareengine.projects.locations.networkPolicies.create": +// method id "vmwareengine.projects.locations.privateClouds.showNsxCredentials": -type ProjectsLocationsNetworkPoliciesCreateCall struct { - s *Service - parent string - networkpolicy *NetworkPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsShowNsxCredentialsCall struct { + s *Service + privateCloud string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new network policy in a given VMware Engine network -// of a project and location (region). A new network policy cannot be -// created if another network policy already exists in the same scope. +// ShowNsxCredentials: Gets details of credentials for NSX appliance. // -// - parent: The resource name of the location (region) to create the -// new network policy in. Resource names are schemeless URIs that -// follow the conventions in -// https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/us-central1`. -func (r *ProjectsLocationsNetworkPoliciesService) Create(parent string, networkpolicy *NetworkPolicy) *ProjectsLocationsNetworkPoliciesCreateCall { - c := &ProjectsLocationsNetworkPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.networkpolicy = networkpolicy - return c -} - -// NetworkPolicyId sets the optional parameter "networkPolicyId": -// Required. The user-provided identifier of the network policy to be -// created. This identifier must be unique within parent -// `projects/{my-project}/locations/{us-central1}/networkPolicies` and -// becomes the final token in the name URI. The identifier must meet the -// following requirements: * Only contains 1-63 alphanumeric characters -// and hyphens * Begins with an alphabetical character * Ends with a -// non-hyphen character * Not formatted as a UUID * Complies with RFC -// 1034 (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) -func (c *ProjectsLocationsNetworkPoliciesCreateCall) NetworkPolicyId(networkPolicyId string) *ProjectsLocationsNetworkPoliciesCreateCall { - c.urlParams_.Set("networkPolicyId", networkPolicyId) - return c -} - -// RequestId sets the optional parameter "requestId": A request ID to -// identify requests. Specify a unique request ID so that if you must -// retry your request, the server will know to ignore the request if it -// has already been completed. The server guarantees that a request -// doesn't result in creation of duplicate commitments for at least 60 -// minutes. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with -// the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. The request ID must be a valid UUID with the exception -// that zero UUID is not supported -// (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsNetworkPoliciesCreateCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesCreateCall { - c.urlParams_.Set("requestId", requestId) +// - privateCloud: The resource name of the private cloud to be queried +// for credentials. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) ShowNsxCredentials(privateCloud string) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { + c := &ProjectsLocationsPrivateCloudsShowNsxCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.privateCloud = privateCloud 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 *ProjectsLocationsNetworkPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesCreateCall { +func (c *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { 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 *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { + 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 *ProjectsLocationsNetworkPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesCreateCall { +func (c *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { 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 *ProjectsLocationsNetworkPoliciesCreateCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetworkPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) 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.networkpolicy) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/networkPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+privateCloud}:showNsxCredentials") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "privateCloud": c.privateCloud, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.networkPolicies.create" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "vmwareengine.projects.locations.privateClouds.showNsxCredentials" call. +// Exactly one of *Credentials 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 +// *Credentials.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 *ProjectsLocationsNetworkPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Do(opts ...googleapi.CallOption) (*Credentials, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3131,7 +10796,7 @@ func (c *ProjectsLocationsNetworkPoliciesCreateCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Credentials{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3143,38 +10808,25 @@ func (c *ProjectsLocationsNetworkPoliciesCreateCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies", - // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.networkPolicies.create", + // "description": "Gets details of credentials for NSX appliance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:showNsxCredentials", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.showNsxCredentials", // "parameterOrder": [ - // "parent" + // "privateCloud" // ], // "parameters": { - // "networkPolicyId": { - // "description": "Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + // "privateCloud": { + // "description": "Required. The resource name of the private cloud to be queried for credentials. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/networkPolicies", - // "request": { - // "$ref": "NetworkPolicy" - // }, + // "path": "v1/{+privateCloud}:showNsxCredentials", // "response": { - // "$ref": "Operation" + // "$ref": "Credentials" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3183,105 +10835,112 @@ func (c *ProjectsLocationsNetworkPoliciesCreateCall) Do(opts ...googleapi.CallOp } -// method id "vmwareengine.projects.locations.networkPolicies.delete": +// method id "vmwareengine.projects.locations.privateClouds.showVcenterCredentials": -type ProjectsLocationsNetworkPoliciesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall struct { + s *Service + privateCloud string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a `NetworkPolicy` resource. A network policy cannot -// be deleted when `NetworkService.state` is set to `RECONCILING` for -// either its external IP or internet access service. +// ShowVcenterCredentials: Gets details of credentials for Vcenter +// appliance. // -// - name: The resource name of the network policy to delete. Resource -// names are schemeless URIs that follow the conventions in -// https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/us-central1/networkPolicies/my-networ -// k-policy`. -func (r *ProjectsLocationsNetworkPoliciesService) Delete(name string) *ProjectsLocationsNetworkPoliciesDeleteCall { - c := &ProjectsLocationsNetworkPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - privateCloud: The resource name of the private cloud to be queried +// for credentials. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) ShowVcenterCredentials(privateCloud string) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { + c := &ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.privateCloud = privateCloud return c } -// RequestId sets the optional parameter "requestId": A request ID to -// identify requests. Specify a unique request ID so that if you must -// retry your request, the server will know to ignore the request if it -// has already been completed. The server guarantees that a request -// doesn't result in creation of duplicate commitments for at least 60 -// minutes. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with -// the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. The request ID must be a valid UUID with the exception -// that zero UUID is not supported -// (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsNetworkPoliciesDeleteCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesDeleteCall { - c.urlParams_.Set("requestId", requestId) +// Username sets the optional parameter "username": The username of the +// user to be queried for credentials. The default value of this field +// is CloudOwner@gve.local. The provided value must be one of the +// following: CloudOwner@gve.local, solution-user-01@gve.local, +// solution-user-02@gve.local, solution-user-03@gve.local, +// solution-user-04@gve.local, solution-user-05@gve.local, +// zertoadmin@gve.local. +func (c *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Username(username string) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { + c.urlParams_.Set("username", username) 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 *ProjectsLocationsNetworkPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesDeleteCall { +func (c *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { 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 *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { + 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 *ProjectsLocationsNetworkPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesDeleteCall { +func (c *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { 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 *ProjectsLocationsNetworkPoliciesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetworkPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+privateCloud}:showVcenterCredentials") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "privateCloud": c.privateCloud, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.networkPolicies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "vmwareengine.projects.locations.privateClouds.showVcenterCredentials" call. +// Exactly one of *Credentials 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 +// *Credentials.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 *ProjectsLocationsNetworkPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Do(opts ...googleapi.CallOption) (*Credentials, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3300,7 +10959,7 @@ func (c *ProjectsLocationsNetworkPoliciesDeleteCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Credentials{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3312,30 +10971,30 @@ func (c *ProjectsLocationsNetworkPoliciesDeleteCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Deletes a `NetworkPolicy` resource. A network policy cannot be deleted when `NetworkService.state` is set to `RECONCILING` for either its external IP or internet access service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", - // "httpMethod": "DELETE", - // "id": "vmwareengine.projects.locations.networkPolicies.delete", + // "description": "Gets details of credentials for Vcenter appliance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:showVcenterCredentials", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.showVcenterCredentials", // "parameterOrder": [ - // "name" + // "privateCloud" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the network policy to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + // "privateCloud": { + // "description": "Required. The resource name of the private cloud to be queried for credentials. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "username": { + // "description": "Optional. The username of the user to be queried for credentials. The default value of this field is CloudOwner@gve.local. The provided value must be one of the following: CloudOwner@gve.local, solution-user-01@gve.local, solution-user-02@gve.local, solution-user-03@gve.local, solution-user-04@gve.local, solution-user-05@gve.local, zertoadmin@gve.local.", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+privateCloud}:showVcenterCredentials", // "response": { - // "$ref": "Operation" + // "$ref": "Credentials" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3344,99 +11003,96 @@ func (c *ProjectsLocationsNetworkPoliciesDeleteCall) Do(opts ...googleapi.CallOp } -// method id "vmwareengine.projects.locations.networkPolicies.get": +// method id "vmwareengine.projects.locations.privateClouds.testIamPermissions": -type ProjectsLocationsNetworkPoliciesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a `NetworkPolicy` resource by its resource name. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - name: The resource name of the network policy to retrieve. Resource -// names are schemeless URIs that follow the conventions in -// https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/us-central1/networkPolicies/my-networ -// k-policy`. -func (r *ProjectsLocationsNetworkPoliciesService) Get(name string) *ProjectsLocationsNetworkPoliciesGetCall { - c := &ProjectsLocationsNetworkPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsPrivateCloudsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsPrivateCloudsTestIamPermissionsCall { + c := &ProjectsLocationsPrivateCloudsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest 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 *ProjectsLocationsNetworkPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesGetCall { +func (c *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsTestIamPermissionsCall { 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 *ProjectsLocationsNetworkPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworkPoliciesGetCall { - 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 *ProjectsLocationsNetworkPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesGetCall { +func (c *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsTestIamPermissionsCall { 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 *ProjectsLocationsNetworkPoliciesGetCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetworkPoliciesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.networkPolicies.get" call. -// Exactly one of *NetworkPolicy or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *NetworkPolicy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "vmwareengine.projects.locations.privateClouds.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.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 *ProjectsLocationsNetworkPoliciesGetCall) Do(opts ...googleapi.CallOption) (*NetworkPolicy, error) { +func (c *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3455,7 +11111,7 @@ func (c *ProjectsLocationsNetworkPoliciesGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkPolicy{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3467,175 +11123,126 @@ func (c *ProjectsLocationsNetworkPoliciesGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Retrieves a `NetworkPolicy` resource by its resource name.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.networkPolicies.get", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the network policy to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" // } - // }, - // "path": "v1/{+name}", - // "response": { - // "$ref": "NetworkPolicy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "vmwareengine.projects.locations.networkPolicies.list": - -type ProjectsLocationsNetworkPoliciesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists `NetworkPolicy` resources in a specified project and -// location. -// -// - parent: The resource name of the location (region) to query for -// network policies. Resource names are schemeless URIs that follow -// the conventions in -// https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/us-central1`. -func (r *ProjectsLocationsNetworkPoliciesService) List(parent string) *ProjectsLocationsNetworkPoliciesListCall { - c := &ProjectsLocationsNetworkPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } -// Filter sets the optional parameter "filter": A filter expression that -// matches resources returned in the response. The expression must -// specify the field name, a comparison operator, and the value that you -// want to use for filtering. The value must be a string, a number, or a -// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For -// example, if you are filtering a list of network policies, you can -// exclude the ones named `example-policy` by specifying `name != -// "example-policy". To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` (name = -// "example-policy") (createTime > "2021-04-12T08:15:10.40Z") ``` By -// default, each expression is an `AND` expression. However, you can -// include `AND` and `OR` expressions explicitly. For example: ``` (name -// = "example-policy-1") AND (createTime > "2021-04-12T08:15:10.40Z") OR -// (name = "example-policy-2") ``` -func (c *ProjectsLocationsNetworkPoliciesListCall) Filter(filter string) *ProjectsLocationsNetworkPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c } -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, returned results are ordered by `name` -// in ascending order. You can also sort results in descending order -// based on the `name` value using `orderBy="name desc". Currently, -// only ordering by `name` is supported. -func (c *ProjectsLocationsNetworkPoliciesListCall) OrderBy(orderBy string) *ProjectsLocationsNetworkPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} +// method id "vmwareengine.projects.locations.privateClouds.undelete": -// PageSize sets the optional parameter "pageSize": The maximum number -// of network policies to return in one page. The service may return -// fewer than this value. The maximum value is coerced to 1000. The -// default value of this field is 500. -func (c *ProjectsLocationsNetworkPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsNetworkPoliciesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsPrivateCloudsUndeleteCall struct { + s *Service + name string + undeleteprivatecloudrequest *UndeletePrivateCloudRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListNetworkPolicies` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListNetworkPolicies` must match the call that provided -// the page token. -func (c *ProjectsLocationsNetworkPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsNetworkPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Undelete: Restores a private cloud that was previously scheduled for +// deletion by `DeletePrivateCloud`. A `PrivateCloud` resource scheduled +// for deletion has `PrivateCloud.state` set to `DELETED` and +// `PrivateCloud.expireTime` set to the time when deletion can no longer +// be reversed. +// +// - name: The resource name of the private cloud scheduled for +// deletion. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) Undelete(name string, undeleteprivatecloudrequest *UndeletePrivateCloudRequest) *ProjectsLocationsPrivateCloudsUndeleteCall { + c := &ProjectsLocationsPrivateCloudsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.undeleteprivatecloudrequest = undeleteprivatecloudrequest 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 *ProjectsLocationsNetworkPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesListCall { +func (c *ProjectsLocationsPrivateCloudsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsUndeleteCall { 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 *ProjectsLocationsNetworkPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworkPoliciesListCall { - 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 *ProjectsLocationsNetworkPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesListCall { +func (c *ProjectsLocationsPrivateCloudsUndeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsUndeleteCall { 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 *ProjectsLocationsNetworkPoliciesListCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsUndeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetworkPoliciesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsUndeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeleteprivatecloudrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/networkPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.networkPolicies.list" call. -// Exactly one of *ListNetworkPoliciesResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListNetworkPoliciesResponse.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 *ProjectsLocationsNetworkPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListNetworkPoliciesResponse, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.undelete" 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 *ProjectsLocationsPrivateCloudsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3654,7 +11261,7 @@ func (c *ProjectsLocationsNetworkPoliciesListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListNetworkPoliciesResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3666,46 +11273,28 @@ func (c *ProjectsLocationsNetworkPoliciesListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists `NetworkPolicy` resources in a specified project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.networkPolicies.list", + // "description": "Restores a private cloud that was previously scheduled for deletion by `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to the time when deletion can no longer be reversed.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:undelete", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.undelete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of network policies, you can exclude the ones named `example-policy` by specifying `name != \"example-policy\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-policy\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-policy-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-policy-2\") ```", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The maximum number of network policies to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListNetworkPolicies` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNetworkPolicies` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the location (region) to query for network policies. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + // "name": { + // "description": "Required. The resource name of the private cloud scheduled for deletion. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/networkPolicies", + // "path": "v1/{+name}:undelete", + // "request": { + // "$ref": "UndeletePrivateCloudRequest" + // }, // "response": { - // "$ref": "ListNetworkPoliciesResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3714,59 +11303,30 @@ func (c *ProjectsLocationsNetworkPoliciesListCall) Do(opts ...googleapi.CallOpti } -// 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 *ProjectsLocationsNetworkPoliciesListCall) Pages(ctx context.Context, f func(*ListNetworkPoliciesResponse) 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 "vmwareengine.projects.locations.networkPolicies.patch": +// method id "vmwareengine.projects.locations.privateClouds.updateDnsForwarding": -type ProjectsLocationsNetworkPoliciesPatchCall struct { +type ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall struct { s *Service name string - networkpolicy *NetworkPolicy + dnsforwarding *DnsForwarding urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Modifies a `NetworkPolicy` resource. Only the following fields -// can be updated: `internet_access`, `external_ip`, -// `edge_services_cidr`. Only fields specified in `updateMask` are -// applied. When updating a network policy, the external IP network -// service can only be disabled if there are no external IP addresses -// present in the scope of the policy. Also, a `NetworkService` cannot -// be updated when `NetworkService.state` is set to `RECONCILING`. -// During operation processing, the resource is temporarily in the -// `ACTIVE` state before the operation fully completes. For that period -// of time, you can't update the resource. Use the operation status to -// determine when the processing fully completes. +// UpdateDnsForwarding: Updates the parameters of the `DnsForwarding` +// config, like associated domains. Only fields specified in +// `update_mask` are applied. // -// - name: Output only. The resource name of this network policy. -// Resource names are schemeless URIs that follow the conventions in +// - name: Output only. The resource name of this DNS profile. Resource +// names are schemeless URIs that follow the conventions in // https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/us-central1/networkPolicies/my-networ -// k-policy`. -func (r *ProjectsLocationsNetworkPoliciesService) Patch(name string, networkpolicy *NetworkPolicy) *ProjectsLocationsNetworkPoliciesPatchCall { - c := &ProjectsLocationsNetworkPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// dnsForwarding`. +func (r *ProjectsLocationsPrivateCloudsService) UpdateDnsForwarding(name string, dnsforwarding *DnsForwarding) *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall { + c := &ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.networkpolicy = networkpolicy + c.dnsforwarding = dnsforwarding return c } @@ -3783,18 +11343,18 @@ func (r *ProjectsLocationsNetworkPoliciesService) Patch(name string, networkpoli // commitments. The request ID must be a valid UUID with the exception // that zero UUID is not supported // (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsNetworkPoliciesPatchCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesPatchCall { +func (c *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall { c.urlParams_.Set("requestId", requestId) return c } // UpdateMask sets the optional parameter "updateMask": Required. Field // mask is used to specify the fields to be overwritten in the -// `NetworkPolicy` resource by the update. The fields specified in the +// `DnsForwarding` resource by the update. The fields specified in the // `update_mask` are relative to the resource, not the full request. A // field will be overwritten if it is in the mask. If the user does not // provide a mask then all fields will be overwritten. -func (c *ProjectsLocationsNetworkPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNetworkPoliciesPatchCall { +func (c *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -3802,7 +11362,7 @@ func (c *ProjectsLocationsNetworkPoliciesPatchCall) UpdateMask(updateMask string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNetworkPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesPatchCall { +func (c *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3810,21 +11370,21 @@ func (c *ProjectsLocationsNetworkPoliciesPatchCall) 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 *ProjectsLocationsNetworkPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesPatchCall { +func (c *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall { 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 *ProjectsLocationsNetworkPoliciesPatchCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetworkPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall) 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_ { @@ -3832,7 +11392,7 @@ func (c *ProjectsLocationsNetworkPoliciesPatchCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkpolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.dnsforwarding) if err != nil { return nil, err } @@ -3852,14 +11412,14 @@ func (c *ProjectsLocationsNetworkPoliciesPatchCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.networkPolicies.patch" call. +// Do executes the "vmwareengine.projects.locations.privateClouds.updateDnsForwarding" 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 *ProjectsLocationsNetworkPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsPrivateCloudsUpdateDnsForwardingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3890,18 +11450,18 @@ func (c *ProjectsLocationsNetworkPoliciesPatchCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Modifies a `NetworkPolicy` resource. Only the following fields can be updated: `internet_access`, `external_ip`, `edge_services_cidr`. Only fields specified in `updateMask` are applied. When updating a network policy, the external IP network service can only be disabled if there are no external IP addresses present in the scope of the policy. Also, a `NetworkService` cannot be updated when `NetworkService.state` is set to `RECONCILING`. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", + // "description": "Updates the parameters of the `DnsForwarding` config, like associated domains. Only fields specified in `update_mask` are applied.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/dnsForwarding", // "httpMethod": "PATCH", - // "id": "vmwareengine.projects.locations.networkPolicies.patch", + // "id": "vmwareengine.projects.locations.privateClouds.updateDnsForwarding", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + // "description": "Output only. The resource name of this DNS profile. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/dnsForwarding$", // "required": true, // "type": "string" // }, @@ -3911,7 +11471,7 @@ func (c *ProjectsLocationsNetworkPoliciesPatchCall) Do(opts ...googleapi.CallOpt // "type": "string" // }, // "updateMask": { - // "description": "Required. Field mask is used to specify the fields to be overwritten in the `NetworkPolicy` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `DnsForwarding` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -3919,7 +11479,7 @@ func (c *ProjectsLocationsNetworkPoliciesPatchCall) Do(opts ...googleapi.CallOpt // }, // "path": "v1/{+name}", // "request": { - // "$ref": "NetworkPolicy" + // "$ref": "DnsForwarding" // }, // "response": { // "$ref": "Operation" @@ -3931,98 +11491,123 @@ func (c *ProjectsLocationsNetworkPoliciesPatchCall) Do(opts ...googleapi.CallOpt } -// method id "vmwareengine.projects.locations.nodeTypes.get": +// method id "vmwareengine.projects.locations.privateClouds.clusters.create": + +type ProjectsLocationsPrivateCloudsClustersCreateCall struct { + s *Service + parent string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new cluster in a given private cloud. Creating a +// new cluster provides additional nodes for use in the parent private +// cloud and requires sufficient node quota +// (https://cloud.google.com/vmware-engine/quotas). +// +// - parent: The resource name of the private cloud to create a new +// cluster in. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsClustersService) Create(parent string, cluster *Cluster) *ProjectsLocationsPrivateCloudsClustersCreateCall { + c := &ProjectsLocationsPrivateCloudsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.cluster = cluster + return c +} + +// ClusterId sets the optional parameter "clusterId": Required. The +// user-provided identifier of the new `Cluster`. This identifier must +// be unique among clusters within the parent and becomes the final +// token in the name URI. The identifier must meet the following +// requirements: * Only contains 1-63 alphanumeric characters and +// hyphens * Begins with an alphabetical character * Ends with a +// non-hyphen character * Not formatted as a UUID * Complies with RFC +// 1034 (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) ClusterId(clusterId string) *ProjectsLocationsPrivateCloudsClustersCreateCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} -type ProjectsLocationsNodeTypesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// RequestId sets the optional parameter "requestId": The request ID +// must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsClustersCreateCall { + c.urlParams_.Set("requestId", requestId) + return c } -// Get: Gets details of a single `NodeType`. -// -// - name: The resource name of the node type to retrieve. Resource -// names are schemeless URIs that follow the conventions in -// https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`. -func (r *ProjectsLocationsNodeTypesService) Get(name string) *ProjectsLocationsNodeTypesGetCall { - c := &ProjectsLocationsNodeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// ValidateOnly sets the optional parameter "validateOnly": True if you +// want the request to be validated and not executed; false otherwise. +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPrivateCloudsClustersCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNodeTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodeTypesGetCall { +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersCreateCall { 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 *ProjectsLocationsNodeTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodeTypesGetCall { - 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 *ProjectsLocationsNodeTypesGetCall) Context(ctx context.Context) *ProjectsLocationsNodeTypesGetCall { +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersCreateCall { 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 *ProjectsLocationsNodeTypesGetCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNodeTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clusters") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.nodeTypes.get" call. -// Exactly one of *NodeType or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *NodeType.ServerResponse.Header or (if a response was returned at +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.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 *ProjectsLocationsNodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, error) { +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4041,7 +11626,7 @@ func (c *ProjectsLocationsNodeTypesGetCall) Do(opts ...googleapi.CallOption) (*N if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NodeType{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4053,25 +11638,43 @@ func (c *ProjectsLocationsNodeTypesGetCall) Do(opts ...googleapi.CallOption) (*N } return ret, nil // { - // "description": "Gets details of a single `NodeType`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes/{nodeTypesId}", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.nodeTypes.get", + // "description": "Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient [node quota](https://cloud.google.com/vmware-engine/quotas).", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the node type to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`", + // "clusterId": { + // "description": "Required. The user-provided identifier of the new `Cluster`. This identifier must be unique among clusters within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to create a new cluster in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/nodeTypes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/clusters", + // "request": { + // "$ref": "Cluster" + // }, // "response": { - // "$ref": "NodeType" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4080,135 +11683,96 @@ func (c *ProjectsLocationsNodeTypesGetCall) Do(opts ...googleapi.CallOption) (*N } -// method id "vmwareengine.projects.locations.nodeTypes.list": +// method id "vmwareengine.projects.locations.privateClouds.clusters.delete": -type ProjectsLocationsNodeTypesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsClustersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists node types +// Delete: Deletes a `Cluster` resource. To avoid unintended data loss, +// migrate or gracefully shut down any workloads running on the cluster +// before deletion. You cannot delete the management cluster of a +// private cloud using this method. // -// - parent: The resource name of the location to be queried for node -// types. Resource names are schemeless URIs that follow the -// conventions in https://cloud.google.com/apis/design/resource_names. -// For example: `projects/my-project/locations/us-central1-a`. -func (r *ProjectsLocationsNodeTypesService) List(parent string) *ProjectsLocationsNodeTypesListCall { - c := &ProjectsLocationsNodeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// matches resources returned in the response. The expression must -// specify the field name, a comparison operator, and the value that you -// want to use for filtering. The value must be a string, a number, or a -// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For -// example, if you are filtering a list of node types, you can exclude -// the ones named `standard-72` by specifying `name != "standard-72". -// To filter on multiple expressions, provide each separate expression -// within parentheses. For example: ``` (name = "standard-72") -// (virtual_cpu_count > 2) ``` By default, each expression is an `AND` -// expression. However, you can include `AND` and `OR` expressions -// explicitly. For example: ``` (name = "standard-96") AND -// (virtual_cpu_count > 2) OR (name = "standard-72") ``` -func (c *ProjectsLocationsNodeTypesListCall) Filter(filter string) *ProjectsLocationsNodeTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of node types to return in one page. The service may return fewer -// than this value. The maximum value is coerced to 1000. The default -// value of this field is 500. -func (c *ProjectsLocationsNodeTypesListCall) PageSize(pageSize int64) *ProjectsLocationsNodeTypesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - name: The resource name of the cluster to delete. Resource names +// are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// clusters/my-cluster`. +func (r *ProjectsLocationsPrivateCloudsClustersService) Delete(name string) *ProjectsLocationsPrivateCloudsClustersDeleteCall { + c := &ProjectsLocationsPrivateCloudsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListNodeTypes` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListNodeTypes` must match the call that provided the -// page token. -func (c *ProjectsLocationsNodeTypesListCall) PageToken(pageToken string) *ProjectsLocationsNodeTypesListCall { - c.urlParams_.Set("pageToken", pageToken) +// RequestId sets the optional parameter "requestId": The request ID +// must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsClustersDeleteCall { + c.urlParams_.Set("requestId", requestId) 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 *ProjectsLocationsNodeTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodeTypesListCall { +func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersDeleteCall { 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 *ProjectsLocationsNodeTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodeTypesListCall { - 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 *ProjectsLocationsNodeTypesListCall) Context(ctx context.Context) *ProjectsLocationsNodeTypesListCall { +func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersDeleteCall { 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 *ProjectsLocationsNodeTypesListCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNodeTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) 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}/nodeTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.nodeTypes.list" call. -// Exactly one of *ListNodeTypesResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListNodeTypesResponse.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 *ProjectsLocationsNodeTypesListCall) Do(opts ...googleapi.CallOption) (*ListNodeTypesResponse, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4227,7 +11791,7 @@ func (c *ProjectsLocationsNodeTypesListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListNodeTypesResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4239,41 +11803,30 @@ func (c *ProjectsLocationsNodeTypesListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Lists node types", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.nodeTypes.list", + // "description": "Deletes a `Cluster` resource. To avoid unintended data loss, migrate or gracefully shut down any workloads running on the cluster before deletion. You cannot delete the management cluster of a private cloud using this method.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of node types, you can exclude the ones named `standard-72` by specifying `name != \"standard-72\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"standard-72\") (virtual_cpu_count \u003e 2) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"standard-96\") AND (virtual_cpu_count \u003e 2) OR (name = \"standard-72\") ```", - // "location": "query", + // "name": { + // "description": "Required. The resource name of the cluster to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "The maximum number of node types to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListNodeTypes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNodeTypes` must match the call that provided the page token.", + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the location to be queried for node types. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" // } // }, - // "path": "v1/{+parent}/nodeTypes", + // "path": "v1/{+name}", // "response": { - // "$ref": "ListNodeTypesResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4282,45 +11835,26 @@ func (c *ProjectsLocationsNodeTypesListCall) Do(opts ...googleapi.CallOption) (* } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsNodeTypesListCall) Pages(ctx context.Context, f func(*ListNodeTypesResponse) 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 "vmwareengine.projects.locations.operations.delete": +// method id "vmwareengine.projects.locations.privateClouds.clusters.get": -type ProjectsLocationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsClustersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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`. +// Get: Retrieves a `Cluster` resource by its resource name. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The cluster resource name to retrieve. Resource names are +// schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// clusters/my-cluster`. +func (r *ProjectsLocationsPrivateCloudsClustersService) Get(name string) *ProjectsLocationsPrivateCloudsClustersGetCall { + c := &ProjectsLocationsPrivateCloudsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4328,41 +11862,54 @@ func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsPrivateCloudsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersGetCall { 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 *ProjectsLocationsPrivateCloudsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsClustersGetCall { + 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 *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsPrivateCloudsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsClustersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsClustersGetCall) 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("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -4373,14 +11920,14 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.get" call. +// Exactly one of *Cluster 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) +// *Cluster.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsLocationsPrivateCloudsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4399,7 +11946,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Cluster{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4411,25 +11958,25 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "vmwareengine.projects.locations.operations.delete", + // "description": "Retrieves a `Cluster` resource by its resource name.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be deleted.", + // "description": "Required. The cluster resource name to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Empty" + // "$ref": "Cluster" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4438,32 +11985,53 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "vmwareengine.projects.locations.operations.get": +// method id "vmwareengine.projects.locations.privateClouds.clusters.getIamPolicy": -type ProjectsLocationsOperationsGetCall struct { +type ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall struct { s *Service - name string + resource 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. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsPrivateCloudsClustersService) GetIamPolicy(resource string) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4473,7 +12041,7 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -4481,21 +12049,21 @@ func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) 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_ { @@ -4508,7 +12076,7 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4516,19 +12084,19 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4547,7 +12115,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4559,25 +12127,31 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:getIamPolicy", // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.operations.get", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4586,45 +12160,67 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "vmwareengine.projects.locations.operations.list": +// method id "vmwareengine.projects.locations.privateClouds.clusters.list": -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsPrivateCloudsClustersListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists `Cluster` resources in a given private cloud. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the private cloud to query for +// clusters. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsClustersService) List(parent string) *ProjectsLocationsPrivateCloudsClustersListCall { + c := &ProjectsLocationsPrivateCloudsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { +// Filter sets the optional parameter "filter": To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (name = "example-cluster") (nodeCount = "3") ``` By +// default, each expression is an `AND` expression. However, you can +// include `AND` and `OR` expressions explicitly. For example: ``` (name +// = "example-cluster-1") AND (createTime > "2021-04-12T08:15:10.40Z") +// OR (name = "example-cluster-2") ``` +func (c *ProjectsLocationsPrivateCloudsClustersListCall) Filter(filter string) *ProjectsLocationsPrivateCloudsClustersListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsPrivateCloudsClustersListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateCloudsClustersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of clusters to return in one page. The service may return fewer than +// this value. The maximum value is coerced to 1000. The default value +// of this field is 500. +func (c *ProjectsLocationsPrivateCloudsClustersListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsClustersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListClusters` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListClusters` must match the call that provided the page +// token. +func (c *ProjectsLocationsPrivateCloudsClustersListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsClustersListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -4632,7 +12228,7 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPrivateCloudsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4642,7 +12238,7 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPrivateCloudsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsClustersListCall { c.ifNoneMatch_ = entityTag return c } @@ -4650,21 +12246,21 @@ func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPrivateCloudsClustersListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsClustersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsClustersListCall) 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_ { @@ -4677,7 +12273,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clusters") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4685,19 +12281,19 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.list" call. +// Exactly one of *ListClustersResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was +// *ListClustersResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +func (c *ProjectsLocationsPrivateCloudsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4716,7 +12312,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &ListClustersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4728,41 +12324,46 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "description": "Lists `Cluster` resources in a given private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.operations.list", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "The standard list filter.", + // "description": " To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-cluster\") (nodeCount = \"3\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-cluster-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-cluster-2\") ```", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of clusters to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous `ListClusters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListClusters` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to query for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}/operations", + // "path": "v1/{+parent}/clusters", // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "ListClustersResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4774,7 +12375,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { +func (c *ProjectsLocationsPrivateCloudsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -4792,60 +12393,58 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } -// method id "vmwareengine.projects.locations.privateClouds.create": +// method id "vmwareengine.projects.locations.privateClouds.clusters.patch": -type ProjectsLocationsPrivateCloudsCreateCall struct { - s *Service - parent string - privatecloud *PrivateCloud - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsClustersPatchCall struct { + s *Service + name string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new `PrivateCloud` resource in a given project and -// location. Private clouds of type `STANDARD` and `TIME_LIMITED` are -// zonal resources, `STRETCHED` private clouds are regional. Creating a -// private cloud also creates a management cluster -// (https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) -// for that private cloud. +// Patch: Modifies a `Cluster` resource. Only fields specified in +// `updateMask` are applied. During operation processing, the resource +// is temporarily in the `ACTIVE` state before the operation fully +// completes. For that period of time, you can't update the resource. +// Use the operation status to determine when the processing fully +// completes. // -// - parent: The resource name of the location to create the new private -// cloud in. Resource names are schemeless URIs that follow the -// conventions in https://cloud.google.com/apis/design/resource_names. -// For example: `projects/my-project/locations/us-central1-a`. -func (r *ProjectsLocationsPrivateCloudsService) Create(parent string, privatecloud *PrivateCloud) *ProjectsLocationsPrivateCloudsCreateCall { - c := &ProjectsLocationsPrivateCloudsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.privatecloud = privatecloud - return c -} - -// PrivateCloudId sets the optional parameter "privateCloudId": -// Required. The user-provided identifier of the private cloud to be -// created. This identifier must be unique among each `PrivateCloud` -// within the parent and becomes the final token in the name URI. The -// identifier must meet the following requirements: * Only contains 1-63 -// alphanumeric characters and hyphens * Begins with an alphabetical -// character * Ends with a non-hyphen character * Not formatted as a -// UUID * Complies with RFC 1034 -// (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) -func (c *ProjectsLocationsPrivateCloudsCreateCall) PrivateCloudId(privateCloudId string) *ProjectsLocationsPrivateCloudsCreateCall { - c.urlParams_.Set("privateCloudId", privateCloudId) +// - name: Output only. The resource name of this cluster. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// clusters/my-cluster`. +func (r *ProjectsLocationsPrivateCloudsClustersService) Patch(name string, cluster *Cluster) *ProjectsLocationsPrivateCloudsClustersPatchCall { + c := &ProjectsLocationsPrivateCloudsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.cluster = cluster return c } // RequestId sets the optional parameter "requestId": The request ID // must be a valid UUID with the exception that zero UUID is not // supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsPrivateCloudsCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsCreateCall { +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsClustersPatchCall { c.urlParams_.Set("requestId", requestId) return c } +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the `Cluster` +// resource by the update. The fields specified in the `updateMask` are +// relative to the resource, not the full request. A field will be +// overwritten if it is in the mask. If the user does not provide a mask +// then all fields will be overwritten. +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsClustersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // ValidateOnly sets the optional parameter "validateOnly": True if you // want the request to be validated and not executed; false otherwise. -func (c *ProjectsLocationsPrivateCloudsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPrivateCloudsCreateCall { +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPrivateCloudsClustersPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -4853,7 +12452,7 @@ func (c *ProjectsLocationsPrivateCloudsCreateCall) ValidateOnly(validateOnly boo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsPrivateCloudsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsCreateCall { +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4861,21 +12460,21 @@ func (c *ProjectsLocationsPrivateCloudsCreateCall) 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 *ProjectsLocationsPrivateCloudsCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsCreateCall { +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersPatchCall { 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 *ProjectsLocationsPrivateCloudsCreateCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) 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_ { @@ -4883,34 +12482,34 @@ func (c *ProjectsLocationsPrivateCloudsCreateCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.privatecloud) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/privateClouds") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.create" call. +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPrivateCloudsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4941,28 +12540,29 @@ func (c *ProjectsLocationsPrivateCloudsCreateCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Creates a new `PrivateCloud` resource in a given project and location. Private clouds of type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are regional. Creating a private cloud also creates a [management cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that private cloud.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds", - // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.create", + // "description": "Modifies a `Cluster` resource. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The resource name of the location to create the new private cloud in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", + // "name": { + // "description": "Output only. The resource name of this cluster. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", // "required": true, // "type": "string" // }, - // "privateCloudId": { - // "description": "Required. The user-provided identifier of the private cloud to be created. This identifier must be unique among each `PrivateCloud` within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // }, - // "requestId": { - // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `Cluster` resource by the update. The fields specified in the `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // }, @@ -4972,9 +12572,9 @@ func (c *ProjectsLocationsPrivateCloudsCreateCall) Do(opts ...googleapi.CallOpti // "type": "boolean" // } // }, - // "path": "v1/{+parent}/privateClouds", + // "path": "v1/{+name}", // "request": { - // "$ref": "PrivateCloud" + // "$ref": "Cluster" // }, // "response": { // "$ref": "Operation" @@ -4986,78 +12586,36 @@ func (c *ProjectsLocationsPrivateCloudsCreateCall) Do(opts ...googleapi.CallOpti } -// method id "vmwareengine.projects.locations.privateClouds.delete": - -type ProjectsLocationsPrivateCloudsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Schedules a `PrivateCloud` resource for deletion. A -// `PrivateCloud` resource scheduled for deletion has -// `PrivateCloud.state` set to `DELETED` and `expireTime` set to the -// time when deletion is final and can no longer be reversed. The delete -// operation is marked as done as soon as the `PrivateCloud` is -// successfully scheduled for deletion (this also applies when -// `delayHours` is set to zero), and the operation is not kept in -// pending state until `PrivateCloud` is purged. `PrivateCloud` can be -// restored using `UndeletePrivateCloud` method before the `expireTime` -// elapses. When `expireTime` is reached, deletion is final and all -// private cloud resources are irreversibly removed and billing stops. -// During the final removal process, `PrivateCloud.state` is set to -// `PURGING`. `PrivateCloud` can be polled using standard `GET` method -// for the whole period of deletion and purging. It will not be returned -// only when it is completely purged. -// -// - name: The resource name of the private cloud to delete. Resource -// names are schemeless URIs that follow the conventions in -// https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsService) Delete(name string) *ProjectsLocationsPrivateCloudsDeleteCall { - c := &ProjectsLocationsPrivateCloudsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// DelayHours sets the optional parameter "delayHours": Time delay of -// the deletion specified in hours. The default value is `3`. Specifying -// a non-zero value for this field changes the value of -// `PrivateCloud.state` to `DELETED` and sets `expire_time` to the -// planned deletion time. Deletion can be cancelled before `expire_time` -// elapses using VmwareEngine.UndeletePrivateCloud. Specifying a value -// of `0` for this field instead begins the deletion process and ceases -// billing immediately. During the final deletion process, the value of -// `PrivateCloud.state` becomes `PURGING`. -func (c *ProjectsLocationsPrivateCloudsDeleteCall) DelayHours(delayHours int64) *ProjectsLocationsPrivateCloudsDeleteCall { - c.urlParams_.Set("delayHours", fmt.Sprint(delayHours)) - return c -} +// method id "vmwareengine.projects.locations.privateClouds.clusters.setIamPolicy": -// Force sets the optional parameter "force": If set to true, cascade -// delete is enabled and all children of this private cloud resource are -// also deleted. When this flag is set to false, the private cloud will -// not be deleted if there are any children other than the management -// cluster. The management cluster is always deleted. -func (c *ProjectsLocationsPrivateCloudsDeleteCall) Force(force bool) *ProjectsLocationsPrivateCloudsDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c +type ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RequestId sets the optional parameter "requestId": The request ID -// must be a valid UUID with the exception that zero UUID is not -// supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsPrivateCloudsDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsDeleteCall { - c.urlParams_.Set("requestId", requestId) +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsPrivateCloudsClustersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest 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 *ProjectsLocationsPrivateCloudsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsDeleteCall { +func (c *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5065,21 +12623,21 @@ func (c *ProjectsLocationsPrivateCloudsDeleteCall) 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 *ProjectsLocationsPrivateCloudsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsDeleteCall { +func (c *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall { 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 *ProjectsLocationsPrivateCloudsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) 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_ { @@ -5087,29 +12645,34 @@ func (c *ProjectsLocationsPrivateCloudsDeleteCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsPrivateCloudsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5128,7 +12691,7 @@ func (c *ProjectsLocationsPrivateCloudsDeleteCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5140,41 +12703,28 @@ func (c *ProjectsLocationsPrivateCloudsDeleteCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Schedules a `PrivateCloud` resource for deletion. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `expireTime` set to the time when deletion is final and can no longer be reversed. The delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached, deletion is final and all private cloud resources are irreversibly removed and billing stops. During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can be polled using standard `GET` method for the whole period of deletion and purging. It will not be returned only when it is completely purged.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", - // "httpMethod": "DELETE", - // "id": "vmwareengine.projects.locations.privateClouds.delete", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "delayHours": { - // "description": "Optional. Time delay of the deletion specified in hours. The default value is `3`. Specifying a non-zero value for this field changes the value of `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned deletion time. Deletion can be cancelled before `expire_time` elapses using VmwareEngine.UndeletePrivateCloud. Specifying a value of `0` for this field instead begins the deletion process and ceases billing immediately. During the final deletion process, the value of `PrivateCloud.state` becomes `PURGING`.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "force": { - // "description": "Optional. If set to true, cascade delete is enabled and all children of this private cloud resource are also deleted. When this flag is set to false, the private cloud will not be deleted if there are any children other than the management cluster. The management cluster is always deleted.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "Required. The resource name of the private cloud to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5183,98 +12733,96 @@ func (c *ProjectsLocationsPrivateCloudsDeleteCall) Do(opts ...googleapi.CallOpti } -// method id "vmwareengine.projects.locations.privateClouds.get": +// method id "vmwareengine.projects.locations.privateClouds.clusters.testIamPermissions": -type ProjectsLocationsPrivateCloudsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a `PrivateCloud` resource by its resource name. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - name: The resource name of the private cloud to retrieve. Resource -// names are schemeless URIs that follow the conventions in -// https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsService) Get(name string) *ProjectsLocationsPrivateCloudsGetCall { - c := &ProjectsLocationsPrivateCloudsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsPrivateCloudsClustersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall { + c := &ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest 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 *ProjectsLocationsPrivateCloudsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsGetCall { +func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall { 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 *ProjectsLocationsPrivateCloudsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsGetCall { - 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 *ProjectsLocationsPrivateCloudsGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsGetCall { +func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall { 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 *ProjectsLocationsPrivateCloudsGetCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.get" call. -// Exactly one of *PrivateCloud or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *PrivateCloud.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 *ProjectsLocationsPrivateCloudsGetCall) Do(opts ...googleapi.CallOption) (*PrivateCloud, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.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 *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5293,7 +12841,7 @@ func (c *ProjectsLocationsPrivateCloudsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PrivateCloud{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5305,25 +12853,28 @@ func (c *ProjectsLocationsPrivateCloudsGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Retrieves a `PrivateCloud` resource by its resource name.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.privateClouds.get", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the private cloud to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "PrivateCloud" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5332,53 +12883,32 @@ func (c *ProjectsLocationsPrivateCloudsGetCall) Do(opts ...googleapi.CallOption) } -// method id "vmwareengine.projects.locations.privateClouds.getIamPolicy": +// method id "vmwareengine.projects.locations.privateClouds.clusters.nodes.get": -type ProjectsLocationsPrivateCloudsGetIamPolicyCall struct { +type ProjectsLocationsPrivateCloudsClustersNodesGetCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. -// -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsPrivateCloudsService) GetIamPolicy(resource string) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { - c := &ProjectsLocationsPrivateCloudsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single node. +// +// - name: The resource name of the node to retrieve. For example: +// `projects/{project}/locations/{location}/privateClouds/{private_clou +// d}/clusters/{cluster}/nodes/{node}`. +func (r *ProjectsLocationsPrivateCloudsClustersNodesService) Get(name string) *ProjectsLocationsPrivateCloudsClustersNodesGetCall { + c := &ProjectsLocationsPrivateCloudsClustersNodesGetCall{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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsClustersNodesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersNodesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5388,7 +12918,7 @@ func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Fields(s ...googleapi.F // 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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsClustersNodesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsClustersNodesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -5396,21 +12926,21 @@ func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) IfNoneMatch(entityTag s // 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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsClustersNodesGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersNodesGetCall { 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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsClustersNodesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsClustersNodesGetCall) 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_ { @@ -5423,7 +12953,7 @@ func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5431,19 +12961,19 @@ func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.nodes.get" call. +// Exactly one of *Node or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either -// *Policy.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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *Node.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 *ProjectsLocationsPrivateCloudsClustersNodesGetCall) Do(opts ...googleapi.CallOption) (*Node, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5462,7 +12992,7 @@ func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Node{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5474,31 +13004,25 @@ func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:getIamPolicy", + // "description": "Gets details of a single node.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}/nodes/{nodesId}", // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.privateClouds.getIamPolicy", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.nodes.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The resource name of the node to retrieve. For example: `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+/nodes/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "Node" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5507,9 +13031,9 @@ func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Do(opts ...googleapi.Ca } -// method id "vmwareengine.projects.locations.privateClouds.list": +// method id "vmwareengine.projects.locations.privateClouds.clusters.nodes.list": -type ProjectsLocationsPrivateCloudsListCall struct { +type ProjectsLocationsPrivateCloudsClustersNodesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -5518,65 +13042,33 @@ type ProjectsLocationsPrivateCloudsListCall struct { header_ http.Header } -// List: Lists `PrivateCloud` resources in a given project and location. +// List: Lists nodes in a given cluster. // -// - parent: The resource name of the private cloud to be queried for -// clusters. Resource names are schemeless URIs that follow the -// conventions in https://cloud.google.com/apis/design/resource_names. -// For example: `projects/my-project/locations/us-central1-a`. -func (r *ProjectsLocationsPrivateCloudsService) List(parent string) *ProjectsLocationsPrivateCloudsListCall { - c := &ProjectsLocationsPrivateCloudsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the cluster to be queried for nodes. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// clusters/my-cluster`. +func (r *ProjectsLocationsPrivateCloudsClustersNodesService) List(parent string) *ProjectsLocationsPrivateCloudsClustersNodesListCall { + c := &ProjectsLocationsPrivateCloudsClustersNodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter expression that -// matches resources returned in the response. The expression must -// specify the field name, a comparison operator, and the value that you -// want to use for filtering. The value must be a string, a number, or a -// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For -// example, if you are filtering a list of private clouds, you can -// exclude the ones named `example-pc` by specifying `name != -// "example-pc". You can also filter nested fields. For example, you -// could specify `networkConfig.managementCidr = "192.168.0.0/24" to -// include private clouds only if they have a matching address in their -// network configuration. To filter on multiple expressions, provide -// each separate expression within parentheses. For example: ``` (name = -// "example-pc") (createTime > "2021-04-12T08:15:10.40Z") ``` By -// default, each expression is an `AND` expression. However, you can -// include `AND` and `OR` expressions explicitly. For example: ``` (name -// = "private-cloud-1") AND (createTime > "2021-04-12T08:15:10.40Z") OR -// (name = "private-cloud-2") ``` -func (c *ProjectsLocationsPrivateCloudsListCall) Filter(filter string) *ProjectsLocationsPrivateCloudsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, returned results are ordered by `name` -// in ascending order. You can also sort results in descending order -// based on the `name` value using `orderBy="name desc". Currently, -// only ordering by `name` is supported. -func (c *ProjectsLocationsPrivateCloudsListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateCloudsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": The maximum number -// of private clouds to return in one page. The service may return fewer -// than this value. The maximum value is coerced to 1000. The default -// value of this field is 500. -func (c *ProjectsLocationsPrivateCloudsListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsListCall { +// of nodes to return in one page. The service may return fewer than +// this value. The maximum value is coerced to 1000. The default value +// of this field is 500. +func (c *ProjectsLocationsPrivateCloudsClustersNodesListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsClustersNodesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListPrivateClouds` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListPrivateClouds` must match the call that provided the -// page token. -func (c *ProjectsLocationsPrivateCloudsListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsListCall { +// received from a previous `ListNodes` call. Provide this to retrieve +// the subsequent page. When paginating, all other parameters provided +// to `ListNodes` must match the call that provided the page token. +func (c *ProjectsLocationsPrivateCloudsClustersNodesListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsClustersNodesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -5584,7 +13076,7 @@ func (c *ProjectsLocationsPrivateCloudsListCall) PageToken(pageToken string) *Pr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsPrivateCloudsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsListCall { +func (c *ProjectsLocationsPrivateCloudsClustersNodesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersNodesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5594,7 +13086,7 @@ func (c *ProjectsLocationsPrivateCloudsListCall) Fields(s ...googleapi.Field) *P // 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 *ProjectsLocationsPrivateCloudsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsListCall { +func (c *ProjectsLocationsPrivateCloudsClustersNodesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsClustersNodesListCall { c.ifNoneMatch_ = entityTag return c } @@ -5602,21 +13094,21 @@ func (c *ProjectsLocationsPrivateCloudsListCall) IfNoneMatch(entityTag string) * // 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 *ProjectsLocationsPrivateCloudsListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsListCall { +func (c *ProjectsLocationsPrivateCloudsClustersNodesListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersNodesListCall { 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 *ProjectsLocationsPrivateCloudsListCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsClustersNodesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsClustersNodesListCall) 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_ { @@ -5629,7 +13121,7 @@ func (c *ProjectsLocationsPrivateCloudsListCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/privateClouds") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nodes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5642,14 +13134,14 @@ func (c *ProjectsLocationsPrivateCloudsListCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.list" call. -// Exactly one of *ListPrivateCloudsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListPrivateCloudsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.nodes.list" call. +// Exactly one of *ListNodesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListNodesResponse.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 *ProjectsLocationsPrivateCloudsListCall) Do(opts ...googleapi.CallOption) (*ListPrivateCloudsResponse, error) { +func (c *ProjectsLocationsPrivateCloudsClustersNodesListCall) Do(opts ...googleapi.CallOption) (*ListNodesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5668,7 +13160,7 @@ func (c *ProjectsLocationsPrivateCloudsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListPrivateCloudsResponse{ + ret := &ListNodesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5680,46 +13172,36 @@ func (c *ProjectsLocationsPrivateCloudsListCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Lists `PrivateCloud` resources in a given project and location.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds", + // "description": "Lists nodes in a given cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}/nodes", // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.privateClouds.list", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.nodes.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of private clouds, you can exclude the ones named `example-pc` by specifying `name != \"example-pc\"`. You can also filter nested fields. For example, you could specify `networkConfig.managementCidr = \"192.168.0.0/24\"` to include private clouds only if they have a matching address in their network configuration. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-pc\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"private-cloud-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"private-cloud-2\") ```", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", - // "location": "query", - // "type": "string" - // }, // "pageSize": { - // "description": "The maximum number of private clouds to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "description": "The maximum number of nodes to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListPrivateClouds` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateClouds` must match the call that provided the page token.", + // "description": "A page token, received from a previous `ListNodes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNodes` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the private cloud to be queried for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", + // "description": "Required. The resource name of the cluster to be queried for nodes. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/privateClouds", + // "path": "v1/{+parent}/nodes", // "response": { - // "$ref": "ListPrivateCloudsResponse" + // "$ref": "ListNodesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5731,7 +13213,7 @@ func (c *ProjectsLocationsPrivateCloudsListCall) Do(opts ...googleapi.CallOption // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsPrivateCloudsListCall) Pages(ctx context.Context, f func(*ListPrivateCloudsResponse) error) error { +func (c *ProjectsLocationsPrivateCloudsClustersNodesListCall) Pages(ctx context.Context, f func(*ListNodesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -5749,58 +13231,70 @@ func (c *ProjectsLocationsPrivateCloudsListCall) Pages(ctx context.Context, f fu } } -// method id "vmwareengine.projects.locations.privateClouds.patch": +// method id "vmwareengine.projects.locations.privateClouds.externalAddresses.create": -type ProjectsLocationsPrivateCloudsPatchCall struct { - s *Service - name string - privatecloud *PrivateCloud - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsExternalAddressesCreateCall struct { + s *Service + parent string + externaladdress *ExternalAddress + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Modifies a `PrivateCloud` resource. Only the following fields -// can be updated: `description`. Only fields specified in `updateMask` -// are applied. During operation processing, the resource is temporarily -// in the `ACTIVE` state before the operation fully completes. For that -// period of time, you can't update the resource. Use the operation -// status to determine when the processing fully completes. +// Create: Creates a new `ExternalAddress` resource in a given private +// cloud. The network policy that corresponds to the private cloud must +// have the external IP address network service enabled +// (`NetworkPolicy.external_ip`). // -// - name: Output only. The resource name of this private cloud. -// Resource names are schemeless URIs that follow the conventions in +// - parent: The resource name of the private cloud to create a new +// external IP address in. Resource names are schemeless URIs that +// follow the conventions in // https://cloud.google.com/apis/design/resource_names. For example: // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsService) Patch(name string, privatecloud *PrivateCloud) *ProjectsLocationsPrivateCloudsPatchCall { - c := &ProjectsLocationsPrivateCloudsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.privatecloud = privatecloud +func (r *ProjectsLocationsPrivateCloudsExternalAddressesService) Create(parent string, externaladdress *ExternalAddress) *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall { + c := &ProjectsLocationsPrivateCloudsExternalAddressesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.externaladdress = externaladdress return c } -// RequestId sets the optional parameter "requestId": The request ID -// must be a valid UUID with the exception that zero UUID is not -// supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsPrivateCloudsPatchCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsPatchCall { - c.urlParams_.Set("requestId", requestId) +// ExternalAddressId sets the optional parameter "externalAddressId": +// Required. The user-provided identifier of the `ExternalAddress` to be +// created. This identifier must be unique among `ExternalAddress` +// resources within the parent and becomes the final token in the name +// URI. The identifier must meet the following requirements: * Only +// contains 1-63 alphanumeric characters and hyphens * Begins with an +// alphabetical character * Ends with a non-hyphen character * Not +// formatted as a UUID * Complies with RFC 1034 +// (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall) ExternalAddressId(externalAddressId string) *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall { + c.urlParams_.Set("externalAddressId", externalAddressId) return c } -// UpdateMask sets the optional parameter "updateMask": Required. Field -// mask is used to specify the fields to be overwritten in the -// `PrivateCloud` resource by the update. The fields specified in -// `updateMask` are relative to the resource, not the full request. A -// field will be overwritten if it is in the mask. If the user does not -// provide a mask then all fields will be overwritten. -func (c *ProjectsLocationsPrivateCloudsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if the original operation +// with the same request ID was received, and if so, will ignore the +// second request. This prevents clients from accidentally creating +// duplicate commitments. The request ID must be a valid UUID with the +// exception that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall { + c.urlParams_.Set("requestId", requestId) 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 *ProjectsLocationsPrivateCloudsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsPatchCall { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5808,21 +13302,21 @@ func (c *ProjectsLocationsPrivateCloudsPatchCall) 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 *ProjectsLocationsPrivateCloudsPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsPatchCall { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall { 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 *ProjectsLocationsPrivateCloudsPatchCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall) 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_ { @@ -5830,34 +13324,34 @@ func (c *ProjectsLocationsPrivateCloudsPatchCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.privatecloud) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.externaladdress) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/externalAddresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.patch" call. +// Do executes the "vmwareengine.projects.locations.privateClouds.externalAddresses.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 *ProjectsLocationsPrivateCloudsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5888,36 +13382,35 @@ func (c *ProjectsLocationsPrivateCloudsPatchCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Modifies a `PrivateCloud` resource. Only the following fields can be updated: `description`. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", - // "httpMethod": "PATCH", - // "id": "vmwareengine.projects.locations.privateClouds.patch", + // "description": "Creates a new `ExternalAddress` resource in a given private cloud. The network policy that corresponds to the private cloud must have the external IP address network service enabled (`NetworkPolicy.external_ip`).", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.externalAddresses.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Output only. The resource name of this private cloud. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "externalAddressId": { + // "description": "Required. The user-provided identifier of the `ExternalAddress` to be created. This identifier must be unique among `ExternalAddress` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to create a new external IP address in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" // }, // "requestId": { - // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Field mask is used to specify the fields to be overwritten in the `PrivateCloud` resource by the update. The fields specified in `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", - // "format": "google-fieldmask", + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+parent}/externalAddresses", // "request": { - // "$ref": "PrivateCloud" + // "$ref": "ExternalAddress" // }, // "response": { // "$ref": "Operation" @@ -5929,35 +13422,53 @@ func (c *ProjectsLocationsPrivateCloudsPatchCall) Do(opts ...googleapi.CallOptio } -// method id "vmwareengine.projects.locations.privateClouds.resetNsxCredentials": +// method id "vmwareengine.projects.locations.privateClouds.externalAddresses.delete": -type ProjectsLocationsPrivateCloudsResetNsxCredentialsCall struct { - s *Service - privateCloud string - resetnsxcredentialsrequest *ResetNsxCredentialsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ResetNsxCredentials: Resets credentials of the NSX appliance. +// Delete: Deletes a single external IP address. When you delete an +// external IP address, connectivity between the external IP address and +// the corresponding internal IP address is lost. // -// - privateCloud: The resource name of the private cloud to reset -// credentials for. Resource names are schemeless URIs that follow the -// conventions in https://cloud.google.com/apis/design/resource_names. -// For example: -// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsService) ResetNsxCredentials(privateCloud string, resetnsxcredentialsrequest *ResetNsxCredentialsRequest) *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall { - c := &ProjectsLocationsPrivateCloudsResetNsxCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.privateCloud = privateCloud - c.resetnsxcredentialsrequest = resetnsxcredentialsrequest +// - name: The resource name of the external IP address to delete. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// externalAddresses/my-ip`. +func (r *ProjectsLocationsPrivateCloudsExternalAddressesService) Delete(name string) *ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall { + c := &ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if the original operation +// with the same request ID was received, and if so, will ignore the +// second request. This prevents clients from accidentally creating +// duplicate commitments. The request ID must be a valid UUID with the +// exception that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall { + c.urlParams_.Set("requestId", requestId) 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 *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5965,21 +13476,21 @@ func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Fields(s ...goog // 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 *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall { 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 *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall) 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_ { @@ -5987,34 +13498,29 @@ func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) doRequest(alt st } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetnsxcredentialsrequest) - 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/{+privateCloud}:resetNsxCredentials") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "privateCloud": c.privateCloud, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.resetNsxCredentials" call. +// Do executes the "vmwareengine.projects.locations.privateClouds.externalAddresses.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6045,26 +13551,28 @@ func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Do(opts ...googl } return ret, nil // { - // "description": "Resets credentials of the NSX appliance.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:resetNsxCredentials", - // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.resetNsxCredentials", + // "description": "Deletes a single external IP address. When you delete an external IP address, connectivity between the external IP address and the corresponding internal IP address is lost.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses/{externalAddressesId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.privateClouds.externalAddresses.delete", // "parameterOrder": [ - // "privateCloud" + // "name" // ], // "parameters": { - // "privateCloud": { - // "description": "Required. The resource name of the private cloud to reset credentials for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "name": { + // "description": "Required. The resource name of the external IP address to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/externalAddresses/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+privateCloud}:resetNsxCredentials", - // "request": { - // "$ref": "ResetNsxCredentialsRequest" - // }, + // "path": "v1/{+name}", // "response": { // "$ref": "Operation" // }, @@ -6075,92 +13583,99 @@ func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Do(opts ...googl } -// method id "vmwareengine.projects.locations.privateClouds.resetVcenterCredentials": +// method id "vmwareengine.projects.locations.privateClouds.externalAddresses.get": -type ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall struct { - s *Service - privateCloud string - resetvcentercredentialsrequest *ResetVcenterCredentialsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsExternalAddressesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ResetVcenterCredentials: Resets credentials of the Vcenter appliance. +// Get: Gets details of a single external IP address. // -// - privateCloud: The resource name of the private cloud to reset -// credentials for. Resource names are schemeless URIs that follow the -// conventions in https://cloud.google.com/apis/design/resource_names. -// For example: -// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsService) ResetVcenterCredentials(privateCloud string, resetvcentercredentialsrequest *ResetVcenterCredentialsRequest) *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall { - c := &ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.privateCloud = privateCloud - c.resetvcentercredentialsrequest = resetvcentercredentialsrequest +// - name: The resource name of the external IP address to retrieve. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// externalAddresses/my-ip`. +func (r *ProjectsLocationsPrivateCloudsExternalAddressesService) Get(name string) *ProjectsLocationsPrivateCloudsExternalAddressesGetCall { + c := &ProjectsLocationsPrivateCloudsExternalAddressesGetCall{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 *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsExternalAddressesGetCall { 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 *ProjectsLocationsPrivateCloudsExternalAddressesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsExternalAddressesGetCall { + 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 *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsExternalAddressesGetCall { 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 *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesGetCall) 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.resetvcentercredentialsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+privateCloud}:resetVcenterCredentials") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "privateCloud": c.privateCloud, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.resetVcenterCredentials" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "vmwareengine.projects.locations.privateClouds.externalAddresses.get" call. +// Exactly one of *ExternalAddress 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 *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *ExternalAddress.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 *ProjectsLocationsPrivateCloudsExternalAddressesGetCall) Do(opts ...googleapi.CallOption) (*ExternalAddress, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6179,7 +13694,7 @@ func (c *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ExternalAddress{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6191,28 +13706,25 @@ func (c *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Do(opts ...g } return ret, nil // { - // "description": "Resets credentials of the Vcenter appliance.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:resetVcenterCredentials", - // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.resetVcenterCredentials", + // "description": "Gets details of a single external IP address.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses/{externalAddressesId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.externalAddresses.get", // "parameterOrder": [ - // "privateCloud" + // "name" // ], // "parameters": { - // "privateCloud": { - // "description": "Required. The resource name of the private cloud to reset credentials for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "name": { + // "description": "Required. The resource name of the external IP address to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/externalAddresses/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+privateCloud}:resetVcenterCredentials", - // "request": { - // "$ref": "ResetVcenterCredentialsRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "Operation" + // "$ref": "ExternalAddress" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6221,93 +13733,148 @@ func (c *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Do(opts ...g } -// method id "vmwareengine.projects.locations.privateClouds.setIamPolicy": +// method id "vmwareengine.projects.locations.privateClouds.externalAddresses.list": -type ProjectsLocationsPrivateCloudsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsExternalAddressesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// List: Lists external IP addresses assigned to VMware workload VMs in +// a given private cloud. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsPrivateCloudsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsPrivateCloudsSetIamPolicyCall { - c := &ProjectsLocationsPrivateCloudsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - parent: The resource name of the private cloud to be queried for +// external IP addresses. Resource names are schemeless URIs that +// follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsExternalAddressesService) List(parent string) *ProjectsLocationsPrivateCloudsExternalAddressesListCall { + c := &ProjectsLocationsPrivateCloudsExternalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of IP addresses, you can exclude +// the ones named `example-ip` by specifying `name != "example-ip". To +// filter on multiple expressions, provide each separate expression +// within parentheses. For example: ``` (name = "example-ip") +// (createTime > "2021-04-12T08:15:10.40Z") ``` By default, each +// expression is an `AND` expression. However, you can include `AND` and +// `OR` expressions explicitly. For example: ``` (name = "example-ip-1") +// AND (createTime > "2021-04-12T08:15:10.40Z") OR (name = +// "example-ip-2") ``` +func (c *ProjectsLocationsPrivateCloudsExternalAddressesListCall) Filter(filter string) *ProjectsLocationsPrivateCloudsExternalAddressesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsPrivateCloudsExternalAddressesListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateCloudsExternalAddressesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of external IP addresses to return in one page. The service may +// return fewer than this value. The maximum value is coerced to 1000. +// The default value of this field is 500. +func (c *ProjectsLocationsPrivateCloudsExternalAddressesListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsExternalAddressesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListExternalAddresses` call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListExternalAddresses` must match the call +// that provided the page token. +func (c *ProjectsLocationsPrivateCloudsExternalAddressesListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsExternalAddressesListCall { + 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 *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsSetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsExternalAddressesListCall { 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 *ProjectsLocationsPrivateCloudsExternalAddressesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsExternalAddressesListCall { + 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 *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsSetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsExternalAddressesListCall { 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 *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesListCall) 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.setiampolicyrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/externalAddresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.externalAddresses.list" call. +// Exactly one of *ListExternalAddressesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListExternalAddressesResponse.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 *ProjectsLocationsPrivateCloudsExternalAddressesListCall) Do(opts ...googleapi.CallOption) (*ListExternalAddressesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6326,7 +13893,7 @@ func (c *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &ListExternalAddressesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6338,28 +13905,46 @@ func (c *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.setIamPolicy", + // "description": "Lists external IP addresses assigned to VMware workload VMs in a given private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.externalAddresses.list", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of IP addresses, you can exclude the ones named `example-ip` by specifying `name != \"example-ip\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-ip\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-ip-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-ip-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of external IP addresses to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListExternalAddresses` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExternalAddresses` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to be queried for external IP addresses. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" - // } - // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" + // } // }, + // "path": "v1/{+parent}/externalAddresses", // "response": { - // "$ref": "Policy" + // "$ref": "ListExternalAddressesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6368,99 +13953,147 @@ func (c *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Do(opts ...googleapi.Ca } -// method id "vmwareengine.projects.locations.privateClouds.showNsxCredentials": +// 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 *ProjectsLocationsPrivateCloudsExternalAddressesListCall) Pages(ctx context.Context, f func(*ListExternalAddressesResponse) 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 ProjectsLocationsPrivateCloudsShowNsxCredentialsCall struct { - s *Service - privateCloud string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "vmwareengine.projects.locations.privateClouds.externalAddresses.patch": + +type ProjectsLocationsPrivateCloudsExternalAddressesPatchCall struct { + s *Service + name string + externaladdress *ExternalAddress + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ShowNsxCredentials: Gets details of credentials for NSX appliance. +// Patch: Updates the parameters of a single external IP address. Only +// fields specified in `update_mask` are applied. During operation +// processing, the resource is temporarily in the `ACTIVE` state before +// the operation fully completes. For that period of time, you can't +// update the resource. Use the operation status to determine when the +// processing fully completes. // -// - privateCloud: The resource name of the private cloud to be queried -// for credentials. Resource names are schemeless URIs that follow the -// conventions in https://cloud.google.com/apis/design/resource_names. -// For example: -// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsService) ShowNsxCredentials(privateCloud string) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { - c := &ProjectsLocationsPrivateCloudsShowNsxCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.privateCloud = privateCloud +// - name: Output only. The resource name of this external IP address. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// externalAddresses/my-address`. +func (r *ProjectsLocationsPrivateCloudsExternalAddressesService) Patch(name string, externaladdress *ExternalAddress) *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall { + c := &ProjectsLocationsPrivateCloudsExternalAddressesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.externaladdress = externaladdress + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if the original operation +// with the same request ID was received, and if so, will ignore the +// second request. This prevents clients from accidentally creating +// duplicate commitments. The request ID must be a valid UUID with the +// exception that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `ExternalAddress` resource by the update. The fields specified in the +// `update_mask` are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall { 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 *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { - 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 *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall { 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 *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.externaladdress) + 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/{+privateCloud}:showNsxCredentials") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "privateCloud": c.privateCloud, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.showNsxCredentials" call. -// Exactly one of *Credentials or error will be non-nil. Any non-2xx +// Do executes the "vmwareengine.projects.locations.privateClouds.externalAddresses.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Credentials.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Do(opts ...googleapi.CallOption) (*Credentials, error) { +func (c *ProjectsLocationsPrivateCloudsExternalAddressesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6479,7 +14112,7 @@ func (c *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Credentials{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6491,25 +14124,39 @@ func (c *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Do(opts ...google } return ret, nil // { - // "description": "Gets details of credentials for NSX appliance.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:showNsxCredentials", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.privateClouds.showNsxCredentials", + // "description": "Updates the parameters of a single external IP address. Only fields specified in `update_mask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses/{externalAddressesId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.privateClouds.externalAddresses.patch", // "parameterOrder": [ - // "privateCloud" + // "name" // ], // "parameters": { - // "privateCloud": { - // "description": "Required. The resource name of the private cloud to be queried for credentials. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "name": { + // "description": "Output only. The resource name of this external IP address. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/externalAddresses/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `ExternalAddress` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+privateCloud}:showNsxCredentials", + // "path": "v1/{+name}", + // "request": { + // "$ref": "ExternalAddress" + // }, // "response": { - // "$ref": "Credentials" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6518,100 +14165,124 @@ func (c *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Do(opts ...google } -// method id "vmwareengine.projects.locations.privateClouds.showVcenterCredentials": +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create": -type ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall struct { - s *Service - privateCloud string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall struct { + s *Service + parent string + hcxactivationkey *HcxActivationKey + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ShowVcenterCredentials: Gets details of credentials for Vcenter -// appliance. +// Create: Creates a new HCX activation key in a given private cloud. // -// - privateCloud: The resource name of the private cloud to be queried -// for credentials. Resource names are schemeless URIs that follow the -// conventions in https://cloud.google.com/apis/design/resource_names. -// For example: -// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsService) ShowVcenterCredentials(privateCloud string) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { - c := &ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.privateCloud = privateCloud +// - parent: The resource name of the private cloud to create the key +// for. Resource names are schemeless URIs that follow the conventions +// in https://cloud.google.com/apis/design/resource_names. For +// example: +// `projects/my-project/locations/us-central1/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) Create(parent string, hcxactivationkey *HcxActivationKey) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.hcxactivationkey = hcxactivationkey + return c +} + +// HcxActivationKeyId sets the optional parameter "hcxActivationKeyId": +// Required. The user-provided identifier of the `HcxActivationKey` to +// be created. This identifier must be unique among `HcxActivationKey` +// resources within the parent and becomes the final token in the name +// URI. The identifier must meet the following requirements: * Only +// contains 1-63 alphanumeric characters and hyphens * Begins with an +// alphabetical character * Ends with a non-hyphen character * Not +// formatted as a UUID * Complies with RFC 1034 +// (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) HcxActivationKeyId(hcxActivationKeyId string) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { + c.urlParams_.Set("hcxActivationKeyId", hcxActivationKeyId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { + c.urlParams_.Set("requestId", requestId) 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 *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { 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 *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { - 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 *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { 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 *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.hcxactivationkey) + 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/{+privateCloud}:showVcenterCredentials") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hcxActivationKeys") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "privateCloud": c.privateCloud, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.showVcenterCredentials" call. -// Exactly one of *Credentials or error will be non-nil. Any non-2xx +// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.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 -// *Credentials.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Do(opts ...googleapi.CallOption) (*Credentials, error) { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6630,7 +14301,7 @@ func (c *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Credentials{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6642,25 +14313,38 @@ func (c *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Do(opts ...go } return ret, nil // { - // "description": "Gets details of credentials for Vcenter appliance.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:showVcenterCredentials", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.privateClouds.showVcenterCredentials", + // "description": "Creates a new HCX activation key in a given private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create", // "parameterOrder": [ - // "privateCloud" + // "parent" // ], // "parameters": { - // "privateCloud": { - // "description": "Required. The resource name of the private cloud to be queried for credentials. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "hcxActivationKeyId": { + // "description": "Required. The user-provided identifier of the `HcxActivationKey` to be created. This identifier must be unique among `HcxActivationKey` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to create the key for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+privateCloud}:showVcenterCredentials", + // "path": "v1/{+parent}/hcxActivationKeys", + // "request": { + // "$ref": "HcxActivationKey" + // }, // "response": { - // "$ref": "Credentials" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6669,96 +14353,99 @@ func (c *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Do(opts ...go } -// method id "vmwareengine.projects.locations.privateClouds.testIamPermissions": +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get": -type ProjectsLocationsPrivateCloudsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Get: Retrieves a `HcxActivationKey` resource by its resource name. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsPrivateCloudsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsPrivateCloudsTestIamPermissionsCall { - c := &ProjectsLocationsPrivateCloudsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: The resource name of the HCX activation key to retrieve. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hc +// xActivationKeys/my-key`. +func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) Get(name string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall{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 *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsTestIamPermissionsCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { + 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 *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsTestIamPermissionsCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { 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 *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) 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.testiampermissionsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get" call. +// Exactly one of *HcxActivationKey or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *HcxActivationKey.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 *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Do(opts ...googleapi.CallOption) (*HcxActivationKey, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6777,7 +14464,7 @@ func (c *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &HcxActivationKey{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6789,28 +14476,25 @@ func (c *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Do(opts ...google } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.testIamPermissions", + // "description": "Retrieves a `HcxActivationKey` resource by its resource name.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The resource name of the HCX activation key to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, + // "path": "v1/{+name}", // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "HcxActivationKey" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6819,96 +14503,118 @@ func (c *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Do(opts ...google } -// method id "vmwareengine.projects.locations.privateClouds.undelete": +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.getIamPolicy": -type ProjectsLocationsPrivateCloudsUndeleteCall struct { - s *Service - name string - undeleteprivatecloudrequest *UndeletePrivateCloudRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Undelete: Restores a private cloud that was previously scheduled for -// deletion by `DeletePrivateCloud`. A `PrivateCloud` resource scheduled -// for deletion has `PrivateCloud.state` set to `DELETED` and -// `PrivateCloud.expireTime` set to the time when deletion can no longer -// be reversed. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - name: The resource name of the private cloud scheduled for -// deletion. Resource names are schemeless URIs that follow the -// conventions in https://cloud.google.com/apis/design/resource_names. -// For example: -// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsService) Undelete(name string, undeleteprivatecloudrequest *UndeletePrivateCloudRequest) *ProjectsLocationsPrivateCloudsUndeleteCall { - c := &ProjectsLocationsPrivateCloudsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeleteprivatecloudrequest = undeleteprivatecloudrequest +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) GetIamPolicy(resource string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsPrivateCloudsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsUndeleteCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsUndeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsUndeleteCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { 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 *ProjectsLocationsPrivateCloudsUndeleteCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsUndeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) 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.undeleteprivatecloudrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.undelete" 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 *ProjectsLocationsPrivateCloudsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6927,7 +14633,7 @@ func (c *ProjectsLocationsPrivateCloudsUndeleteCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6939,28 +14645,31 @@ func (c *ProjectsLocationsPrivateCloudsUndeleteCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Restores a private cloud that was previously scheduled for deletion by `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to the time when deletion can no longer be reversed.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:undelete", - // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.undelete", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the private cloud scheduled for deletion. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}:undelete", - // "request": { - // "$ref": "UndeletePrivateCloudRequest" - // }, + // "path": "v1/{+resource}:getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6969,105 +14678,100 @@ func (c *ProjectsLocationsPrivateCloudsUndeleteCall) Do(opts ...googleapi.CallOp } -// method id "vmwareengine.projects.locations.privateClouds.clusters.create": +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list": -type ProjectsLocationsPrivateCloudsClustersCreateCall struct { - s *Service - parent string - cluster *Cluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsHcxActivationKeysListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new cluster in a given private cloud. Creating a -// new cluster provides additional nodes for use in the parent private -// cloud and requires sufficient node quota -// (https://cloud.google.com/vmware-engine/quotas). +// List: Lists `HcxActivationKey` resources in a given private cloud. // -// - parent: The resource name of the private cloud to create a new -// cluster in. Resource names are schemeless URIs that follow the -// conventions in https://cloud.google.com/apis/design/resource_names. -// For example: -// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsClustersService) Create(parent string, cluster *Cluster) *ProjectsLocationsPrivateCloudsClustersCreateCall { - c := &ProjectsLocationsPrivateCloudsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the private cloud to be queried for +// HCX activation keys. Resource names are schemeless URIs that follow +// the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) List(parent string) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.cluster = cluster - return c -} - -// ClusterId sets the optional parameter "clusterId": Required. The -// user-provided identifier of the new `Cluster`. This identifier must -// be unique among clusters within the parent and becomes the final -// token in the name URI. The identifier must meet the following -// requirements: * Only contains 1-63 alphanumeric characters and -// hyphens * Begins with an alphabetical character * Ends with a -// non-hyphen character * Not formatted as a UUID * Complies with RFC -// 1034 (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) -func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) ClusterId(clusterId string) *ProjectsLocationsPrivateCloudsClustersCreateCall { - c.urlParams_.Set("clusterId", clusterId) return c } -// RequestId sets the optional parameter "requestId": The request ID -// must be a valid UUID with the exception that zero UUID is not -// supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsClustersCreateCall { - c.urlParams_.Set("requestId", requestId) +// PageSize sets the optional parameter "pageSize": The maximum number +// of HCX activation keys to return in one page. The service may return +// fewer than this value. The maximum value is coerced to 1000. The +// default value of this field is 500. +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// ValidateOnly sets the optional parameter "validateOnly": True if you -// want the request to be validated and not executed; false otherwise. -func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPrivateCloudsClustersCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListHcxActivationKeys` call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListHcxActivationKeys` must match the call +// that provided the page token. +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { + 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 *ProjectsLocationsPrivateCloudsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersCreateCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { + 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 *ProjectsLocationsPrivateCloudsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersCreateCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { 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 *ProjectsLocationsPrivateCloudsClustersCreateCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) 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.cluster) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clusters") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hcxActivationKeys") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -7078,14 +14782,14 @@ func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.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 *ProjectsLocationsPrivateCloudsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list" call. +// Exactly one of *ListHcxActivationKeysResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListHcxActivationKeysResponse.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Do(opts ...googleapi.CallOption) (*ListHcxActivationKeysResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7104,7 +14808,7 @@ func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ListHcxActivationKeysResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7116,43 +14820,36 @@ func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient [node quota](https://cloud.google.com/vmware-engine/quotas).", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", - // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.clusters.create", + // "description": "Lists `HcxActivationKey` resources in a given private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "clusterId": { - // "description": "Required. The user-provided identifier of the new `Cluster`. This identifier must be unique among clusters within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "pageSize": { + // "description": "The maximum number of HCX activation keys to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListHcxActivationKeys` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListHcxActivationKeys` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the private cloud to create a new cluster in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "description": "Required. The resource name of the private cloud to be queried for HCX activation keys. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1/{+parent}/clusters", - // "request": { - // "$ref": "Cluster" - // }, + // "path": "v1/{+parent}/hcxActivationKeys", // "response": { - // "$ref": "Operation" + // "$ref": "ListHcxActivationKeysResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7161,44 +14858,57 @@ func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) Do(opts ...googleapi. } -// method id "vmwareengine.projects.locations.privateClouds.clusters.delete": - -type ProjectsLocationsPrivateCloudsClustersDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Pages(ctx context.Context, f func(*ListHcxActivationKeysResponse) 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) + } } -// Delete: Deletes a `Cluster` resource. To avoid unintended data loss, -// migrate or gracefully shut down any workloads running on the cluster -// before deletion. You cannot delete the management cluster of a -// private cloud using this method. -// -// - name: The resource name of the cluster to delete. Resource names -// are schemeless URIs that follow the conventions in -// https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ -// clusters/my-cluster`. -func (r *ProjectsLocationsPrivateCloudsClustersService) Delete(name string) *ProjectsLocationsPrivateCloudsClustersDeleteCall { - c := &ProjectsLocationsPrivateCloudsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.setIamPolicy": + +type ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RequestId sets the optional parameter "requestId": The request ID -// must be a valid UUID with the exception that zero UUID is not -// supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsClustersDeleteCall { - c.urlParams_.Set("requestId", requestId) +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest 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 *ProjectsLocationsPrivateCloudsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersDeleteCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7206,21 +14916,21 @@ func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) Fields(s ...googleapi // 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 *ProjectsLocationsPrivateCloudsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersDeleteCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall { 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 *ProjectsLocationsPrivateCloudsClustersDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) 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_ { @@ -7228,29 +14938,34 @@ func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7269,7 +14984,7 @@ func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7281,30 +14996,28 @@ func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Deletes a `Cluster` resource. To avoid unintended data loss, migrate or gracefully shut down any workloads running on the cluster before deletion. You cannot delete the management cluster of a private cloud using this method.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", - // "httpMethod": "DELETE", - // "id": "vmwareengine.projects.locations.privateClouds.clusters.delete", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.setIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the cluster to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7313,99 +15026,96 @@ func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) Do(opts ...googleapi. } -// method id "vmwareengine.projects.locations.privateClouds.clusters.get": +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.testIamPermissions": -type ProjectsLocationsPrivateCloudsClustersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a `Cluster` resource by its resource name. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - name: The cluster resource name to retrieve. Resource names are -// schemeless URIs that follow the conventions in -// https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ -// clusters/my-cluster`. -func (r *ProjectsLocationsPrivateCloudsClustersService) Get(name string) *ProjectsLocationsPrivateCloudsClustersGetCall { - c := &ProjectsLocationsPrivateCloudsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest 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 *ProjectsLocationsPrivateCloudsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersGetCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall { 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 *ProjectsLocationsPrivateCloudsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsClustersGetCall { - 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 *ProjectsLocationsPrivateCloudsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersGetCall { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall { 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 *ProjectsLocationsPrivateCloudsClustersGetCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsClustersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.get" call. -// Exactly one of *Cluster or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Cluster.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 *ProjectsLocationsPrivateCloudsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7424,7 +15134,7 @@ func (c *ProjectsLocationsPrivateCloudsClustersGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Cluster{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7436,25 +15146,28 @@ func (c *ProjectsLocationsPrivateCloudsClustersGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Retrieves a `Cluster` resource by its resource name.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.privateClouds.clusters.get", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. The cluster resource name to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "Cluster" + // "$ref": "TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7463,118 +15176,124 @@ func (c *ProjectsLocationsPrivateCloudsClustersGetCall) Do(opts ...googleapi.Cal } -// method id "vmwareengine.projects.locations.privateClouds.clusters.getIamPolicy": +// method id "vmwareengine.projects.locations.privateClouds.loggingServers.create": -type ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsLoggingServersCreateCall struct { + s *Service + parent string + loggingserver *LoggingServer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// Create: Create a new logging server for a given private cloud. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsPrivateCloudsClustersService) GetIamPolicy(resource string) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { - c := &ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the private cloud to create a new +// Logging Server in. Resource names are schemeless URIs that follow +// the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsLoggingServersService) Create(parent string, loggingserver *LoggingServer) *ProjectsLocationsPrivateCloudsLoggingServersCreateCall { + c := &ProjectsLocationsPrivateCloudsLoggingServersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.loggingserver = loggingserver return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// LoggingServerId sets the optional parameter "loggingServerId": +// Required. The user-provided identifier of the `LoggingServer` to be +// created. This identifier must be unique among `LoggingServer` +// resources within the parent and becomes the final token in the name +// URI. The identifier must meet the following requirements: * Only +// contains 1-63 alphanumeric characters and hyphens * Begins with an +// alphabetical character * Ends with a non-hyphen character * Not +// formatted as a UUID * Complies with RFC 1034 +// (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsPrivateCloudsLoggingServersCreateCall) LoggingServerId(loggingServerId string) *ProjectsLocationsPrivateCloudsLoggingServersCreateCall { + c.urlParams_.Set("loggingServerId", loggingServerId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsLoggingServersCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsLoggingServersCreateCall { + c.urlParams_.Set("requestId", requestId) 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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsLoggingServersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsLoggingServersCreateCall { 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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { - 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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsLoggingServersCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsLoggingServersCreateCall { 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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsLoggingServersCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsLoggingServersCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.loggingserver) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/loggingServers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.loggingServers.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 *ProjectsLocationsPrivateCloudsLoggingServersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7593,7 +15312,7 @@ func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7604,32 +15323,39 @@ func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Do(opts ...goog return nil, err } return ret, nil - // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.privateClouds.clusters.getIamPolicy", + // { + // "description": "Create a new logging server for a given private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.loggingServers.create", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", + // "loggingServerId": { + // "description": "Required. The user-provided identifier of the `LoggingServer` to be created. This identifier must be unique among `LoggingServer` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", // "location": "query", - // "type": "integer" + // "type": "string" // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "parent": { + // "description": "Required. The resource name of the private cloud to create a new Logging Server in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+parent}/loggingServers", + // "request": { + // "$ref": "LoggingServer" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7638,140 +15364,103 @@ func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Do(opts ...goog } -// method id "vmwareengine.projects.locations.privateClouds.clusters.list": +// method id "vmwareengine.projects.locations.privateClouds.loggingServers.delete": -type ProjectsLocationsPrivateCloudsClustersListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsLoggingServersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists `Cluster` resources in a given private cloud. +// Delete: Deletes a single logging server. // -// - parent: The resource name of the private cloud to query for -// clusters. Resource names are schemeless URIs that follow the -// conventions in https://cloud.google.com/apis/design/resource_names. -// For example: -// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsClustersService) List(parent string) *ProjectsLocationsPrivateCloudsClustersListCall { - c := &ProjectsLocationsPrivateCloudsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (name = "example-cluster") (nodeCount = "3") ``` By -// default, each expression is an `AND` expression. However, you can -// include `AND` and `OR` expressions explicitly. For example: ``` (name -// = "example-cluster-1") AND (createTime > "2021-04-12T08:15:10.40Z") -// OR (name = "example-cluster-2") ``` -func (c *ProjectsLocationsPrivateCloudsClustersListCall) Filter(filter string) *ProjectsLocationsPrivateCloudsClustersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, returned results are ordered by `name` -// in ascending order. You can also sort results in descending order -// based on the `name` value using `orderBy="name desc". Currently, -// only ordering by `name` is supported. -func (c *ProjectsLocationsPrivateCloudsClustersListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateCloudsClustersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of clusters to return in one page. The service may return fewer than -// this value. The maximum value is coerced to 1000. The default value -// of this field is 500. -func (c *ProjectsLocationsPrivateCloudsClustersListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsClustersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - name: The resource name of the logging server to delete. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// loggingServers/my-logging-server`. +func (r *ProjectsLocationsPrivateCloudsLoggingServersService) Delete(name string) *ProjectsLocationsPrivateCloudsLoggingServersDeleteCall { + c := &ProjectsLocationsPrivateCloudsLoggingServersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListClusters` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListClusters` must match the call that provided the page -// token. -func (c *ProjectsLocationsPrivateCloudsClustersListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsClustersListCall { - c.urlParams_.Set("pageToken", pageToken) +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsLoggingServersDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsLoggingServersDeleteCall { + c.urlParams_.Set("requestId", requestId) 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 *ProjectsLocationsPrivateCloudsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersListCall { +func (c *ProjectsLocationsPrivateCloudsLoggingServersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsLoggingServersDeleteCall { 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 *ProjectsLocationsPrivateCloudsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsClustersListCall { - 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 *ProjectsLocationsPrivateCloudsClustersListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersListCall { +func (c *ProjectsLocationsPrivateCloudsLoggingServersDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsLoggingServersDeleteCall { 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 *ProjectsLocationsPrivateCloudsClustersListCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsLoggingServersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsClustersListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsLoggingServersDeleteCall) 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}/clusters") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.list" call. -// Exactly one of *ListClustersResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListClustersResponse.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 *ProjectsLocationsPrivateCloudsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.loggingServers.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsLoggingServersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7790,7 +15479,7 @@ func (c *ProjectsLocationsPrivateCloudsClustersListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListClustersResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7802,46 +15491,30 @@ func (c *ProjectsLocationsPrivateCloudsClustersListCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Lists `Cluster` resources in a given private cloud.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.privateClouds.clusters.list", + // "description": "Deletes a single logging server.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers/{loggingServersId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.privateClouds.loggingServers.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": " To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-cluster\") (nodeCount = \"3\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-cluster-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-cluster-2\") ```", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", - // "location": "query", + // "name": { + // "description": "Required. The resource name of the logging server to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/loggingServers/[^/]+$", + // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "The maximum number of clusters to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListClusters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListClusters` must match the call that provided the page token.", + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the private cloud to query for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", - // "required": true, - // "type": "string" // } // }, - // "path": "v1/{+parent}/clusters", + // "path": "v1/{+name}", // "response": { - // "$ref": "ListClustersResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7850,126 +15523,81 @@ func (c *ProjectsLocationsPrivateCloudsClustersListCall) Do(opts ...googleapi.Ca } -// 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 *ProjectsLocationsPrivateCloudsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) 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 "vmwareengine.projects.locations.privateClouds.clusters.patch": +// method id "vmwareengine.projects.locations.privateClouds.loggingServers.get": -type ProjectsLocationsPrivateCloudsClustersPatchCall struct { - s *Service - name string - cluster *Cluster - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsLoggingServersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Modifies a `Cluster` resource. Only fields specified in -// `updateMask` are applied. During operation processing, the resource -// is temporarily in the `ACTIVE` state before the operation fully -// completes. For that period of time, you can't update the resource. -// Use the operation status to determine when the processing fully -// completes. +// Get: Gets details of a logging server. // -// - name: Output only. The resource name of this cluster. Resource +// - name: The resource name of the Logging Server to retrieve. Resource // names are schemeless URIs that follow the conventions in // https://cloud.google.com/apis/design/resource_names. For example: // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ -// clusters/my-cluster`. -func (r *ProjectsLocationsPrivateCloudsClustersService) Patch(name string, cluster *Cluster) *ProjectsLocationsPrivateCloudsClustersPatchCall { - c := &ProjectsLocationsPrivateCloudsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// loggingServers/my-logging-server`. +func (r *ProjectsLocationsPrivateCloudsLoggingServersService) Get(name string) *ProjectsLocationsPrivateCloudsLoggingServersGetCall { + c := &ProjectsLocationsPrivateCloudsLoggingServersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.cluster = cluster - return c -} - -// RequestId sets the optional parameter "requestId": The request ID -// must be a valid UUID with the exception that zero UUID is not -// supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsClustersPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Field -// mask is used to specify the fields to be overwritten in the `Cluster` -// resource by the update. The fields specified in the `updateMask` are -// relative to the resource, not the full request. A field will be -// overwritten if it is in the mask. If the user does not provide a mask -// then all fields will be overwritten. -func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsClustersPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": True if you -// want the request to be validated and not executed; false otherwise. -func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPrivateCloudsClustersPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersPatchCall { +func (c *ProjectsLocationsPrivateCloudsLoggingServersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsLoggingServersGetCall { 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 *ProjectsLocationsPrivateCloudsLoggingServersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsLoggingServersGetCall { + 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 *ProjectsLocationsPrivateCloudsClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersPatchCall { +func (c *ProjectsLocationsPrivateCloudsLoggingServersGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsLoggingServersGetCall { 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 *ProjectsLocationsPrivateCloudsClustersPatchCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsLoggingServersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsLoggingServersGetCall) 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.cluster) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -7980,14 +15608,14 @@ func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "vmwareengine.projects.locations.privateClouds.loggingServers.get" call. +// Exactly one of *LoggingServer 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 *ProjectsLocationsPrivateCloudsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *LoggingServer.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 *ProjectsLocationsPrivateCloudsLoggingServersGetCall) Do(opts ...googleapi.CallOption) (*LoggingServer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8006,7 +15634,7 @@ func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &LoggingServer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8018,44 +15646,25 @@ func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Modifies a `Cluster` resource. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", - // "httpMethod": "PATCH", - // "id": "vmwareengine.projects.locations.privateClouds.clusters.patch", + // "description": "Gets details of a logging server.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers/{loggingServersId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.loggingServers.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The resource name of this cluster. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + // "description": "Required. The resource name of the Logging Server to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/loggingServers/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Field mask is used to specify the fields to be overwritten in the `Cluster` resource by the update. The fields specified in the `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", - // "location": "query", - // "type": "boolean" // } // }, // "path": "v1/{+name}", - // "request": { - // "$ref": "Cluster" - // }, // "response": { - // "$ref": "Operation" + // "$ref": "LoggingServer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8064,93 +15673,147 @@ func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) Do(opts ...googleapi.C } -// method id "vmwareengine.projects.locations.privateClouds.clusters.setIamPolicy": +// method id "vmwareengine.projects.locations.privateClouds.loggingServers.list": -type ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsLoggingServersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// List: Lists logging servers configured for a given private cloud. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsPrivateCloudsClustersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall { - c := &ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - parent: The resource name of the private cloud to be queried for +// logging servers. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsLoggingServersService) List(parent string) *ProjectsLocationsPrivateCloudsLoggingServersListCall { + c := &ProjectsLocationsPrivateCloudsLoggingServersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of logging servers, you can +// exclude the ones named `example-server` by specifying `name != +// "example-server". To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` (name = +// "example-server") (createTime > "2021-04-12T08:15:10.40Z") ``` By +// default, each expression is an `AND` expression. However, you can +// include `AND` and `OR` expressions explicitly. For example: ``` (name +// = "example-server-1") AND (createTime > "2021-04-12T08:15:10.40Z") OR +// (name = "example-server-2") ``` +func (c *ProjectsLocationsPrivateCloudsLoggingServersListCall) Filter(filter string) *ProjectsLocationsPrivateCloudsLoggingServersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsPrivateCloudsLoggingServersListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateCloudsLoggingServersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of logging servers to return in one page. The service may return +// fewer than this value. The maximum value is coerced to 1000. The +// default value of this field is 500. +func (c *ProjectsLocationsPrivateCloudsLoggingServersListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsLoggingServersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListLoggingServersRequest` call. Provide +// this to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListLoggingServersRequest` must match the +// call that provided the page token. +func (c *ProjectsLocationsPrivateCloudsLoggingServersListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsLoggingServersListCall { + 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 *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsLoggingServersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsLoggingServersListCall { 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 *ProjectsLocationsPrivateCloudsLoggingServersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsLoggingServersListCall { + 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 *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsLoggingServersListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsLoggingServersListCall { 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 *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsLoggingServersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsLoggingServersListCall) 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.setiampolicyrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/loggingServers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.loggingServers.list" call. +// Exactly one of *ListLoggingServersResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListLoggingServersResponse.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 *ProjectsLocationsPrivateCloudsLoggingServersListCall) Do(opts ...googleapi.CallOption) (*ListLoggingServersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8169,7 +15832,7 @@ func (c *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &ListLoggingServersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8181,28 +15844,46 @@ func (c *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Do(opts ...goog } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.clusters.setIamPolicy", + // "description": "Lists logging servers configured for a given private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.loggingServers.list", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of logging servers, you can exclude the ones named `example-server` by specifying `name != \"example-server\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-server\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-server-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-server-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of logging servers to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListLoggingServersRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListLoggingServersRequest` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to be queried for logging servers. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, + // "path": "v1/{+parent}/loggingServers", // "response": { - // "$ref": "Policy" + // "$ref": "ListLoggingServersResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8211,39 +15892,86 @@ func (c *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Do(opts ...goog } -// method id "vmwareengine.projects.locations.privateClouds.clusters.testIamPermissions": +// 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 *ProjectsLocationsPrivateCloudsLoggingServersListCall) Pages(ctx context.Context, f func(*ListLoggingServersResponse) 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 ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "vmwareengine.projects.locations.privateClouds.loggingServers.patch": + +type ProjectsLocationsPrivateCloudsLoggingServersPatchCall struct { + s *Service + name string + loggingserver *LoggingServer + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Patch: Updates the parameters of a single logging server. Only fields +// specified in `update_mask` are applied. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsPrivateCloudsClustersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall { - c := &ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: Output only. The resource name of this logging server. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// loggingServers/my-logging-server`. +func (r *ProjectsLocationsPrivateCloudsLoggingServersService) Patch(name string, loggingserver *LoggingServer) *ProjectsLocationsPrivateCloudsLoggingServersPatchCall { + c := &ProjectsLocationsPrivateCloudsLoggingServersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.loggingserver = loggingserver + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsLoggingServersPatchCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsLoggingServersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `LoggingServer` resource by the update. The fields specified in the +// `update_mask` are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsPrivateCloudsLoggingServersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsLoggingServersPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall { +func (c *ProjectsLocationsPrivateCloudsLoggingServersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsLoggingServersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8251,21 +15979,21 @@ func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Fields(s // 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 *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall { +func (c *ProjectsLocationsPrivateCloudsLoggingServersPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsLoggingServersPatchCall { 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 *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsLoggingServersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsLoggingServersPatchCall) 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_ { @@ -8273,34 +16001,34 @@ func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) doRequest } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.loggingserver) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.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 *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.loggingServers.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsLoggingServersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8319,7 +16047,7 @@ func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8331,28 +16059,39 @@ func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Do(opts . } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.clusters.testIamPermissions", + // "description": "Updates the parameters of a single logging server. Only fields specified in `update_mask` are applied.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers/{loggingServersId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.privateClouds.loggingServers.patch", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Output only. The resource name of this logging server. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/loggingServers/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `LoggingServer` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", + // "path": "v1/{+name}", // "request": { - // "$ref": "TestIamPermissionsRequest" + // "$ref": "LoggingServer" // }, // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8361,42 +16100,50 @@ func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Do(opts . } -// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create": +// method id "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.create": -type ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall struct { - s *Service - parent string - hcxactivationkey *HcxActivationKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall struct { + s *Service + parent string + managementdnszonebinding *ManagementDnsZoneBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new HCX activation key in a given private cloud. +// Create: Creates a new `ManagementDnsZoneBinding` resource in a +// private cloud. This RPC creates the DNS binding and the resource that +// represents the DNS binding of the consumer VPC network to the +// management DNS zone. A management DNS zone is the Cloud DNS +// cross-project binding zone that VMware Engine creates for each +// private cloud. It contains FQDNs and corresponding IP addresses for +// the private cloud's ESXi hosts and management VM appliances like +// vCenter and NSX Manager. // -// - parent: The resource name of the private cloud to create the key -// for. Resource names are schemeless URIs that follow the conventions -// in https://cloud.google.com/apis/design/resource_names. For -// example: -// `projects/my-project/locations/us-central1/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) Create(parent string, hcxactivationkey *HcxActivationKey) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { - c := &ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the private cloud to create a new +// management DNS zone binding for. Resource names are schemeless URIs +// that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService) Create(parent string, managementdnszonebinding *ManagementDnsZoneBinding) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall { + c := &ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.hcxactivationkey = hcxactivationkey + c.managementdnszonebinding = managementdnszonebinding return c } -// HcxActivationKeyId sets the optional parameter "hcxActivationKeyId": -// Required. The user-provided identifier of the `HcxActivationKey` to -// be created. This identifier must be unique among `HcxActivationKey` -// resources within the parent and becomes the final token in the name -// URI. The identifier must meet the following requirements: * Only -// contains 1-63 alphanumeric characters and hyphens * Begins with an -// alphabetical character * Ends with a non-hyphen character * Not -// formatted as a UUID * Complies with RFC 1034 +// ManagementDnsZoneBindingId sets the optional parameter +// "managementDnsZoneBindingId": Required. The user-provided identifier +// of the `ManagementDnsZoneBinding` resource to be created. This +// identifier must be unique among `ManagementDnsZoneBinding` resources +// within the parent and becomes the final token in the name URI. The +// identifier must meet the following requirements: * Only contains 1-63 +// alphanumeric characters and hyphens * Begins with an alphabetical +// character * Ends with a non-hyphen character * Not formatted as a +// UUID * Complies with RFC 1034 // (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) HcxActivationKeyId(hcxActivationKeyId string) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { - c.urlParams_.Set("hcxActivationKeyId", hcxActivationKeyId) +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall) ManagementDnsZoneBindingId(managementDnsZoneBindingId string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall { + c.urlParams_.Set("managementDnsZoneBindingId", managementDnsZoneBindingId) return c } @@ -8407,13 +16154,13 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) HcxActivatio // doesn't result in creation of duplicate commitments for at least 60 // minutes. For example, consider a situation where you make an initial // request and the request times out. If you make the request again with -// the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second -// request. This prevents clients from accidentally creating duplicate -// commitments. The request ID must be a valid UUID with the exception -// that zero UUID is not supported +// the same request ID, the server can check if the original operation +// with the same request ID was received, and if so, will ignore the +// second request. This prevents clients from accidentally creating +// duplicate commitments. The request ID must be a valid UUID with the +// exception that zero UUID is not supported // (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -8421,7 +16168,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) RequestId(re // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8429,21 +16176,21 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Fields(s ... // 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall { 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall) 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_ { @@ -8451,14 +16198,14 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) doRequest(al } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.hcxactivationkey) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.managementdnszonebinding) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hcxActivationKeys") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/managementDnsZoneBindings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8471,14 +16218,14 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create" call. +// Do executes the "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8509,35 +16256,35 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Do(opts ...g } return ret, nil // { - // "description": "Creates a new HCX activation key in a given private cloud.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + // "description": "Creates a new `ManagementDnsZoneBinding` resource in a private cloud. This RPC creates the DNS binding and the resource that represents the DNS binding of the consumer VPC network to the management DNS zone. A management DNS zone is the Cloud DNS cross-project binding zone that VMware Engine creates for each private cloud. It contains FQDNs and corresponding IP addresses for the private cloud's ESXi hosts and management VM appliances like vCenter and NSX Manager.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings", // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create", + // "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "hcxActivationKeyId": { - // "description": "Required. The user-provided identifier of the `HcxActivationKey` to be created. This identifier must be unique among `HcxActivationKey` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "managementDnsZoneBindingId": { + // "description": "Required. The user-provided identifier of the `ManagementDnsZoneBinding` resource to be created. This identifier must be unique among `ManagementDnsZoneBinding` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the private cloud to create the key for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", + // "description": "Required. The resource name of the private cloud to create a new management DNS zone binding for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" // }, // "requestId": { - // "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/hcxActivationKeys", + // "path": "v1/{+parent}/managementDnsZoneBindings", // "request": { - // "$ref": "HcxActivationKey" + // "$ref": "ManagementDnsZoneBinding" // }, // "response": { // "$ref": "Operation" @@ -8549,81 +16296,88 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Do(opts ...g } -// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get": +// method id "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.delete": -type ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a `HcxActivationKey` resource by its resource name. +// Delete: Deletes a `ManagementDnsZoneBinding` resource. When a +// management DNS zone binding is deleted, the corresponding consumer +// VPC network is no longer bound to the management DNS zone. // -// - name: The resource name of the HCX activation key to retrieve. -// Resource names are schemeless URIs that follow the conventions in -// https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hc -// xActivationKeys/my-key`. -func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) Get(name string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { - c := &ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the management DNS zone binding to +// delete. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// managementDnsZoneBindings/my-management-dns-zone-binding`. +func (r *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService) Delete(name string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall { + c := &ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if the original operation +// with the same request ID was received, and if so, will ignore the +// second request. This prevents clients from accidentally creating +// duplicate commitments. The request ID must be a valid UUID with the +// exception that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall { 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { - 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall { 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -8634,14 +16388,14 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get" call. -// Exactly one of *HcxActivationKey or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *HcxActivationKey.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Do(opts ...googleapi.CallOption) (*HcxActivationKey, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8660,7 +16414,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HcxActivationKey{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8672,25 +16426,30 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Do(opts ...goog } return ret, nil // { - // "description": "Retrieves a `HcxActivationKey` resource by its resource name.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}", - // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get", + // "description": "Deletes a `ManagementDnsZoneBinding` resource. When a management DNS zone binding is deleted, the corresponding consumer VPC network is no longer bound to the management DNS zone.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the HCX activation key to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`", + // "description": "Required. The resource name of the management DNS zone binding to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "HcxActivationKey" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8699,53 +16458,36 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Do(opts ...goog } -// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.getIamPolicy": +// method id "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.get": -type ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall struct { +type ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// Get: Retrieves a 'ManagementDnsZoneBinding' resource by its resource +// name. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) GetIamPolicy(resource string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { - c := &ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The resource name of the management DNS zone binding to +// retrieve. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// managementDnsZoneBindings/my-management-dns-zone-binding`. +func (r *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService) Get(name string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall { + c := &ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall{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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8755,7 +16497,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Fields // 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -8763,21 +16505,21 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) IfNone // 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall { 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall) 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_ { @@ -8790,7 +16532,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) doRequ var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8798,19 +16540,19 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) doRequ } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.get" call. +// Exactly one of *ManagementDnsZoneBinding or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ManagementDnsZoneBinding.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 *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsGetCall) Do(opts ...googleapi.CallOption) (*ManagementDnsZoneBinding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8829,7 +16571,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &ManagementDnsZoneBinding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8841,31 +16583,25 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Do(opt } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:getIamPolicy", + // "description": "Retrieves a 'ManagementDnsZoneBinding' resource by its resource name.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}", // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.getIamPolicy", + // "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The resource name of the management DNS zone binding to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:getIamPolicy", + // "path": "v1/{+name}", // "response": { - // "$ref": "Policy" + // "$ref": "ManagementDnsZoneBinding" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8874,9 +16610,9 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Do(opt } -// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list": +// method id "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.list": -type ProjectsLocationsPrivateCloudsHcxActivationKeysListCall struct { +type ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -8885,34 +16621,67 @@ type ProjectsLocationsPrivateCloudsHcxActivationKeysListCall struct { header_ http.Header } -// List: Lists `HcxActivationKey` resources in a given private cloud. +// List: Lists Consumer VPCs bound to Management DNS Zone of a given +// private cloud. // // - parent: The resource name of the private cloud to be queried for -// HCX activation keys. Resource names are schemeless URIs that follow -// the conventions in +// management DNS zone bindings. Resource names are schemeless URIs +// that follow the conventions in // https://cloud.google.com/apis/design/resource_names. For example: -// `projects/my-project/locations/us-central1/privateClouds/my-cloud`. -func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) List(parent string) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { - c := &ProjectsLocationsPrivateCloudsHcxActivationKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService) List(parent string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall { + c := &ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of Management DNS Zone Bindings, +// you can exclude the ones named `example-management-dns-zone-binding` +// by specifying `name != "example-management-dns-zone-binding". To +// filter on multiple expressions, provide each separate expression +// within parentheses. For example: ``` (name = +// "example-management-dns-zone-binding") (createTime > +// "2021-04-12T08:15:10.40Z") ``` By default, each expression is an +// `AND` expression. However, you can include `AND` and `OR` expressions +// explicitly. For example: ``` (name = +// "example-management-dns-zone-binding-1") AND (createTime > +// "2021-04-12T08:15:10.40Z") OR (name = +// "example-management-dns-zone-binding-2") ``` +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall) Filter(filter string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number -// of HCX activation keys to return in one page. The service may return -// fewer than this value. The maximum value is coerced to 1000. The -// default value of this field is 500. -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { +// of management DNS zone bindings to return in one page. The service +// may return fewer than this value. The maximum value is coerced to +// 1000. The default value of this field is 500. +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListHcxActivationKeys` call. Provide this -// to retrieve the subsequent page. When paginating, all other -// parameters provided to `ListHcxActivationKeys` must match the call -// that provided the page token. -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { +// received from a previous `ListManagementDnsZoneBindings` call. +// Provide this to retrieve the subsequent page. When paginating, all +// other parameters provided to `ListManagementDnsZoneBindings` must +// match the call that provided the page token. +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -8920,7 +16689,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) PageToken(page // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8930,7 +16699,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Fields(s ...go // 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall { c.ifNoneMatch_ = entityTag return c } @@ -8938,21 +16707,21 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) IfNoneMatch(en // 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall { 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall) 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_ { @@ -8965,7 +16734,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hcxActivationKeys") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/managementDnsZoneBindings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8978,14 +16747,15 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list" call. -// Exactly one of *ListHcxActivationKeysResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListHcxActivationKeysResponse.ServerResponse.Header or (if a +// Do executes the "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.list" call. +// Exactly one of *ListManagementDnsZoneBindingsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *ListManagementDnsZoneBindingsResponse.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Do(opts ...googleapi.CallOption) (*ListHcxActivationKeysResponse, error) { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall) Do(opts ...googleapi.CallOption) (*ListManagementDnsZoneBindingsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9004,7 +16774,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListHcxActivationKeysResponse{ + ret := &ListManagementDnsZoneBindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9016,36 +16786,46 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Do(opts ...goo } return ret, nil // { - // "description": "Lists `HcxActivationKey` resources in a given private cloud.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + // "description": "Lists Consumer VPCs bound to Management DNS Zone of a given private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings", // "httpMethod": "GET", - // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list", + // "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of Management DNS Zone Bindings, you can exclude the ones named `example-management-dns-zone-binding` by specifying `name != \"example-management-dns-zone-binding\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-management-dns-zone-binding\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-management-dns-zone-binding-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-management-dns-zone-binding-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, // "pageSize": { - // "description": "The maximum number of HCX activation keys to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "description": "The maximum number of management DNS zone bindings to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListHcxActivationKeys` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListHcxActivationKeys` must match the call that provided the page token.", + // "description": "A page token, received from a previous `ListManagementDnsZoneBindings` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListManagementDnsZoneBindings` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the private cloud to be queried for HCX activation keys. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", + // "description": "Required. The resource name of the private cloud to be queried for management DNS zone bindings. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+parent}/hcxActivationKeys", + // "path": "v1/{+parent}/managementDnsZoneBindings", // "response": { - // "$ref": "ListHcxActivationKeysResponse" + // "$ref": "ListManagementDnsZoneBindingsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9057,7 +16837,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Do(opts ...goo // 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Pages(ctx context.Context, f func(*ListHcxActivationKeysResponse) error) error { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsListCall) Pages(ctx context.Context, f func(*ListManagementDnsZoneBindingsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -9075,36 +16855,65 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Pages(ctx cont } } -// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.setIamPolicy": +// method id "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.patch": -type ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall struct { + s *Service + name string + managementdnszonebinding *ManagementDnsZoneBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// Patch: Updates a `ManagementDnsZoneBinding` resource. Only fields +// specified in `update_mask` are applied. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall { - c := &ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: Output only. The resource name of this binding. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// managementDnsZoneBindings/my-management-dns-zone-binding`. +func (r *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService) Patch(name string, managementdnszonebinding *ManagementDnsZoneBinding) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall { + c := &ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.managementdnszonebinding = managementdnszonebinding + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if the original operation +// with the same request ID was received, and if so, will ignore the +// second request. This prevents clients from accidentally creating +// duplicate commitments. The request ID must be a valid UUID with the +// exception that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `ManagementDnsZoneBinding` resource by the update. The fields +// specified in the `update_mask` are relative to the resource, not the +// full request. A field will be overwritten if it is in the mask. If +// the user does not provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9112,21 +16921,21 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Fields // 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall { 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall) 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_ { @@ -9134,34 +16943,34 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) doRequ } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.managementdnszonebinding) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9180,7 +16989,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9192,28 +17001,39 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Do(opt } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.setIamPolicy", + // "description": "Updates a `ManagementDnsZoneBinding` resource. Only fields specified in `update_mask` are applied.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.patch", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Output only. The resource name of this binding. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `ManagementDnsZoneBinding` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+resource}:setIamPolicy", + // "path": "v1/{+name}", // "request": { - // "$ref": "SetIamPolicyRequest" + // "$ref": "ManagementDnsZoneBinding" // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9222,39 +17042,37 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Do(opt } -// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.testIamPermissions": +// method id "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.repair": -type ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsRepairCall struct { + s *Service + name string + repairmanagementdnszonebindingrequest *RepairManagementDnsZoneBindingRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Repair: Retries to create a `ManagementDnsZoneBinding` resource that +// is in failed state. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall { - c := &ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: The resource name of the management DNS zone binding to +// repair. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// managementDnsZoneBindings/my-management-dns-zone-binding`. +func (r *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsService) Repair(name string, repairmanagementdnszonebindingrequest *RepairManagementDnsZoneBindingRequest) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsRepairCall { + c := &ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.repairmanagementdnszonebindingrequest = repairmanagementdnszonebindingrequest 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsRepairCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsRepairCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9262,21 +17080,21 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) // 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsRepairCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsRepairCall { 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsRepairCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsRepairCall) 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_ { @@ -9284,14 +17102,14 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairmanagementdnszonebindingrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:repair") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -9299,19 +17117,19 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// Do executes the "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.repair" 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 *ProjectsLocationsPrivateCloudsManagementDnsZoneBindingsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9330,7 +17148,7 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9342,28 +17160,28 @@ func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:testIamPermissions", + // "description": "Retries to create a `ManagementDnsZoneBinding` resource that is in failed state.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}:repair", // "httpMethod": "POST", - // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.testIamPermissions", + // "id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.repair", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. The resource name of the management DNS zone binding to repair. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1/{+resource}:testIamPermissions", + // "path": "v1/{+name}:repair", // "request": { - // "$ref": "TestIamPermissionsRequest" + // "$ref": "RepairManagementDnsZoneBindingRequest" // }, // "response": { - // "$ref": "TestIamPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform"